-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clam 1607 fix benign overflow & leaks loading PDB & WDB databases #530
Conversation
dfd17ca
to
c806c45
Compare
This PR replaces #462 |
c806c45
to
0fa734a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 error handling thing to tidy up, otherwise is good
1d18874
to
ef717ae
Compare
ef717ae
to
cda9fd5
Compare
From offline conversations: this PR is presently held up because the cleanup code added is slow and is causing timeouts in the test environment. @ragusaa is working on finding a faster way to track those pointers for cleanup. |
6060484
to
496b4f6
Compare
36ee4bd
to
9fc8db7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With exception to these minor changes requested, this all looks really great. It went through the test pipelines nicely. I used the internal-fuzz-corpus PR to verify that it resolves CLAM-1607 and the related ones (1642, 1649, 1653) and with manual testing, confirmed that 1691 is resolved as well.
9fc8db7
to
cb85b4b
Compare
Just rebased for you to same some effort, since I did it for testing locally. |
There is a possible overflow read when loading PDB and WDB phishing signatures. This issue is not a vulnerability. Changed const char pointers to uint8_t pointers when they are to be used with data, as well as removing asserts and adding additional error checking. Thank you Michał Dardas for reporting this issue.
d0de311
to
5ccb0c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Fixes a benign overflow loading PDB or WDB databases, reported by Michał Dardas.
This fix also resolves:
This commit also fixes a minor leak of pattern matching trans nodes that was observed when testing with the MPOOL module disabled.
The fix changed
const char
pointers touint8_t
pointers when they are to be used with data, as well as removing asserts and adding additional error checking.