-
Notifications
You must be signed in to change notification settings - Fork 35
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
Decoder may expose contents of uninitialized memory in the output #33
Comments
I have received the email. Thanks! |
This was fixed by #38. The bug is in the following code: libflate/src/deflate/decode.rs Lines 107 to 127 in 71d12d2
This code never checks that distance is not 0. If it is and length is > 0, the following happens:
This may be a devastating vulnerability in some contexts, e.g. if used as deflate backend for a PNG decoder. Details and impact analysis for similar bugs in PNG decoders in C can be found here. I am confident that this private function is vulnerable, but I am not sure if this vulnerability can be exploited by supplying a malformed input - there might be some non-local checks that prevent it. Please fix the bug and check if it's possible to trigger it through a crafted input file, either via setting |
Yes. |
Thanks! I'm closing this issue then. |
Thank you very much for your contribution! |
libflate might expose contents of uninitialized memory in the output when given a crafted input. This may be a devastating vulnerability in some contexts, e.g. if used as deflate backend for a PNG decoder. Details and impact analysis for similar bugs in PNG decoders in C can be found here.
I am confident that a private function is vulnerable, but I am not sure if this vulnerability can be exploiter by supplying a malformed input; there could be some non-local checks that prevent it.
I shall relay further details on the issue to the maintainer privately by email.
The text was updated successfully, but these errors were encountered: