Skip to content

Conversation

tabudz
Copy link

@tabudz tabudz commented Feb 18, 2025

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 https://gitlab.com/federicomenaquintero/bzip2/-/commit/74de1e2e6ffc9d51ef9824db71a8ffee5962cdbc.

This PR applies the same patch as the one in zlib to eliminate the vulnerability.

References
https://nvd.nist.gov/vuln/detail/CVE-2019-12900
https://gitlab.com/federicomenaquintero/bzip2/-/commit/74de1e2e6ffc9d51ef9824db71a8ffee5962cdbc

nSelectors is used in a loop from 0 to nSelectors to access selectorMtf
which is
	UChar    selectorMtf[BZ_MAX_SELECTORS];
so if nSelectors is bigger than BZ_MAX_SELECTORS it'll do an invalid memory
access

Fixes out of bounds access discovered while fuzzying karchive
Prepare for 1.0.8 release.

local vulnerability fix:
- Fix CVE-2019-12900
Copy link

Choose a reason for hiding this comment

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

GH shows something is missing in this file.

Copy link

@nobkd nobkd Feb 20, 2025

Choose a reason for hiding this comment

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

That's an End Of File (EOF) without newline marker, to be able to tell it apart from EOF with newline. Nothing's missing.

@reneleonhardt
Copy link

@jart Can this 1-line security patch be applied?

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

Successfully merging this pull request may close these issues.

4 participants