Skip to content

Fix: Potential Vulnerability in Cloned Function#3063

Merged
davisking merged 1 commit intodavisking:masterfrom
tabudz:CVE-2022-37434
Mar 4, 2025
Merged

Fix: Potential Vulnerability in Cloned Function#3063
davisking merged 1 commit intodavisking:masterfrom
tabudz:CVE-2022-37434

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