Skip to content

Fix: Potential Vulnerability in Cloned Function #3063

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

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

tabudz
Copy link
Contributor

@tabudz tabudz commented Mar 3, 2025

Description
This PR fixes a security vulnerability in inflate() that was cloned from zlib but did not receive the security patch applied in zlib. The original issue was reported and fixed under madler/zlib@eff308a.
This PR applies the same patch as the one in zlib to eliminate the vulnerability.

References
https://nvd.nist.gov/vuln/detail/CVE-2022-37434
madler/zlib@eff308a

If the extra field was larger than the space the user provided with
inflateGetHeader(), and if multiple calls of inflate() delivered
the extra header data, then there could be a buffer overflow of the
provided space. This commit assures that provided space is not
exceeded.
@davisking davisking merged commit 5f58d49 into davisking:master Mar 4, 2025
10 checks passed
@davisking
Copy link
Owner

Thanks for another fix :D

davisking pushed a commit to kSkip/dlib that referenced this pull request Apr 19, 2025
…isking#3063)

If the extra field was larger than the space the user provided with
inflateGetHeader(), and if multiple calls of inflate() delivered
the extra header data, then there could be a buffer overflow of the
provided space. This commit assures that provided space is not
exceeded.
@tabudz
Copy link
Contributor Author

tabudz commented Apr 21, 2025

Hi @davisking, thanks for merging my PR. Just want to let you know that I plan to report this as a CVE. Let me know if you have any concern!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants