Fix invalid memory access in `curl_certificates` table by uptycs-rmack · Pull Request #8339 · osquery/osquery
Conversation
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
changed the title
Fix invalid memory access in curl_certificates table
Fix invalid memory access in curl_certificates table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters