Skip to content

Conversation

@uptycs-rmack
Copy link
Contributor

@uptycs-rmack uptycs-rmack commented May 29, 2024

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.

@uptycs-rmack uptycs-rmack requested review from a team as code owners May 29, 2024 18:04
@uptycs-rmack uptycs-rmack force-pushed the master branch 2 times, most recently from 6e2b550 to dd2e28a Compare May 29, 2024 18:07
@directionless directionless changed the title Fix invalid memory access in curl_certificates table Fix invalid memory access in curl_certificates table Jun 20, 2024
@directionless directionless merged commit facb644 into osquery:master Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants