Skip to content
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

zlib/minizip: Update to version 1.2.13, remove zlib from freetype #69395

Merged
merged 1 commit into from
Jan 7, 2023

Conversation

DeeJayLSP
Copy link
Contributor

@DeeJayLSP DeeJayLSP commented Nov 30, 2022

I wanted to update zlib and minizip on a single commit, but both seem to act independently from each other.

I plan to update minizip on another PR (it is ready, but unsure if patches are done correctly), but if the maintainers demand minizip here too, I will do a force push once it's ready.

@DeeJayLSP DeeJayLSP requested a review from a team as a code owner November 30, 2022 14:20
@Chaosus Chaosus added this to the 4.0 milestone Dec 2, 2022
@akien-mga
Copy link
Member

Looks good, but indeed it would be better to have zlib and minizip in the same commit, as they're part of the same codebase.

@akien-mga akien-mga added cherrypick:3.x Considered for cherry-picking into a future 3.x release bug cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release and removed enhancement labels Dec 21, 2022
@akien-mga
Copy link
Member

For the record, this is a security update:

zlib 1.2.13 release notes

October 13, 2022

Version 1.2.13 has these key updates:

  • Fix a bug when getting a gzip header extra field with inflateGetHeader(). This remedies CVE-2022-37434.
  • Fix a bug in block type selection when Z_FIXED used. Now the smallest block type is selected, for better compression.
  • Fix a configure issue that discarded the provided CC definition.
  • Correct incorrect inputs provided to the CRC functions. This mitigates a bug in Java.
  • Repair prototypes and exporting of the new CRC functions.
  • Fix inflateBack to detect invalid input with distances too far.

Due to the first bug fix, any installations of 1.2.12 or earlier should be replaced with 1.2.13.

Security update, fixes CVE-2022-37434 in zlib.

Only applications exposing/using `inflateGetHeader()` seem to be affected,
which is not our case, so this is not critical for Godot.

Remove duplicated copy of zlib in freetype sources to force using the updated
version in `thirdparty/zlib/`.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
@akien-mga akien-mga changed the title Update zlib to 1.2.13 zlib/minizip: Update to version 1.2.13, remove zlib from freetype Jan 7, 2023
@akien-mga
Copy link
Member

Pushed an update to sync minizip with the zlib 1.2.13 code. The security vulnerability doesn't seem to affect our usage but it's worth patching anyway.

I also removed the vendored copy of zlib from thirdparty/freetype/src/gzip/ so that we don't need to patch it ourselves until upstream releases a new freetype patch release. It's better anyway to ensure that we use a single copy of that code (I'm not sure which include path took precedence before between thirdparty/zlib and thirdparty/freetype/src/gzip when building freetype).

@akien-mga akien-mga merged commit ed1cfb6 into godotengine:master Jan 7, 2023
@akien-mga
Copy link
Member

Thanks!

@DeeJayLSP DeeJayLSP deleted the update_zlib branch January 8, 2023 13:38
@akien-mga
Copy link
Member

Cherry-picked for 3.6.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jan 11, 2023
@akien-mga
Copy link
Member

Cherry-picked for 3.5.2.

@akien-mga akien-mga removed the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Jan 11, 2023
akien-mga added a commit to akien-mga/godot that referenced this pull request Dec 5, 2024
…nvendored builds

This restriction was added to fix godotengine#7373 back then, which was a symbol conflict
between FreeType's bundled copy of gzip/zlib, and distro packages.

But we also unbundled FreeType's zlib in godotengine#69395 so this is no longer an issue.
akien-mga added a commit to akien-mga/godot that referenced this pull request Dec 5, 2024
…nvendored builds

This restriction was added to fix godotengine#7373 back then, which was a symbol conflict
between FreeType's bundled copy of gzip/zlib, and distro packages.

But we also unbundled FreeType's zlib in godotengine#69395 so this is no longer an issue.
akien-mga added a commit to akien-mga/godot that referenced this pull request Dec 5, 2024
…nvendored builds

This restriction was added to fix godotengine#7373 back then, which was a symbol conflict
between FreeType's bundled copy of gzip/zlib, and distro packages.

But we also unbundled FreeType's zlib in godotengine#69395 so this is no longer an issue.
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.

3 participants