Fix invalid memory access in `curl_certificates` table by uptycs-rmack · Pull Request #8339 · osquery/osquery

Conversation

@uptycs-rmack

While running valgrind on osquery it reported an invalid memory access in the curl_certificates table. There is a read and potential write 1 byte past the end of a memory buffer when stripping trailing newline from the end of the formatted X509 extension name. In this PR I remove the spurious check past the end of the buffer and also fix an issue where, if a newline had been found at the end of the buffer, the output included a NIL byte at the end instead of actually shrinking the string as intended.

directionless

@directionless directionless changed the title Fix invalid memory access in curl_certificates table Fix invalid memory access in curl_certificates table

Jun 20, 2024

Labels