Skip to content

Fix: Potential Vulnerability in Cloned zlib-Function#6246

Merged
mvieth merged 1 commit intoPointCloudLibrary:masterfrom
tabudz:CVE-2022-37434
Mar 4, 2025
Merged

Fix: Potential Vulnerability in Cloned zlib-Function#6246
mvieth merged 1 commit intoPointCloudLibrary:masterfrom
tabudz:CVE-2022-37434

Conversation

@tabudz
Copy link
Copy Markdown
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.
@mvieth mvieth added module: surface changelog: fix Meta-information for changelog generation labels Mar 4, 2025
Copy link
Copy Markdown
Member

@mvieth mvieth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
As a side note: PCL will by default use a zlib installation from the system (see https://github.com/PointCloudLibrary/pcl/blob/master/surface/CMakeLists.txt#L70 ) and will only use these copied zlib files if specifically requested by the user. So hopefully the effects of these potential vulnerabilities are not too extensive.

@mvieth mvieth merged commit f10dfe9 into PointCloudLibrary:master Mar 4, 2025
@tabudz
Copy link
Copy Markdown
Contributor Author

tabudz commented Apr 16, 2025

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

@mvieth
Copy link
Copy Markdown
Member

mvieth commented Apr 16, 2025

@tabudz Thank you for the heads-up. If you report this, may I suggest to include my note from above? That is: since version 1.14.0, PCL by default uses a zlib installation from the system, unless the user sets WITH_SYSTEM_ZLIB=FALSE. So this potential vulnerability is only relevant if the PCL version is older than 1.14.0 or the user specifically requests to not use the system zlib. For reference:
https://github.com/PointCloudLibrary/pcl/blob/master/surface/CMakeLists.txt#L70 and 502bd2b

@mvieth mvieth changed the title Fix: Potential Vulnerability in Cloned Function Fix: Potential Vulnerability in Cloned zlib-Function Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: fix Meta-information for changelog generation module: surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants