Skip to content

Update zlib and minizip to 1.4 to resolve CVEs - #1720

Merged
DanRod1999 merged 4 commits into
mainfrom
danrod1999/zlib-1.4
Nov 19, 2026
Merged

DanRod1999 merged 4 commits into
mainfrom
danrod1999/zlib-1.4

Conversation

@DanRod1999

Copy link
Copy Markdown
Contributor

Updates zlib and minizip from 1.3.2 to 1.4 to resolve the Mend alerts against zlib 1.3.2 (CVE-2026-85091, WS-2026-0182, WS-2026-0183, WS-2026-0184). Besides the gzwrite() overflow, 1.4 fixes the inflateGetDictionary() overflow and several minizip memory-safety and path-traversal issues.

  • Pin zlib to 1.4 in every vcpkg graph that uses it (compress, png, curl, crashpad, freetype2), and minizip to 1.4 in compress.
  • Move those registry baselines to microsoft/vcpkg@98d7375b, the merge commit of [zlib, minizip] Update to 1.4 microsoft/vcpkg#54958 ("[zlib, minizip] Update to 1.4"). Between the old and new baselines, no other port in these graphs changes version except libpng (1.6.59#1), which is unaffected because png pins 1.6.59 exactly.
  • Breaking change handled: zlib 1.4 renames the MSVC libraries (zs/zsd → libzs/libzsd, minizips/minizipsd → libminizips/libminizipsd), so compress/Zlib.mke now uses the new Windows archive names. Non-Windows names are unchanged.
  • Update libsrc/README.md and the zlib/minizip entries in CompressNugetLicense.json.
Notes and validation
  • vcpkg install --dry-run with x64-windows-static resolves all five graphs to zlib 1.4 (and minizip 1.4 in compress) with no version conflicts. Linux and other platforms are left to CI.
  • The crashpad overlay port finds zlib with find_library(NAMES z;zs;...). vcpkg's portfile lookup on Windows tries both the "" and lib prefixes, so it still finds libzs.lib.
  • minizip 1.4 installs the same public headers (crypt.h, ints.h, ioapi.h, mztools.h, unzip.h, zip.h) under include/minizip/, so header staging in Zlib.mke is unchanged.
  • Other 1.4 behavior changes (z_off_t back to long on Windows, deflateReset() clearing the gzip header, gzopen("x")) don't affect this repo: nothing here calls the gz*, deflateSetHeader, or prime/dictionary APIs directly, and everything is rebuilt against the 1.4 headers.
  • minizip 1.4 drops the unofficial-iowin32 feature, which isn't used here.

generated with Claude Opus 5.5

Bump the zlib/minizip vcpkg pins to 1.4 in every graph that consumes zlib
(compress, png, curl, crashpad, freetype2) and move those registry baselines
to microsoft/vcpkg 98d7375b, the merge of microsoft/vcpkg#54958.

zlib 1.4 renames the MSVC libraries (zs -> libzs, minizips -> libminizips),
so update the Windows archive names in Zlib.mke.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@DanRod1999
DanRod1999 requested review from a team and tcobbs-bentley as code owners November 16, 2026 18:28
@mergify

mergify Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@DanRod1999
DanRod1999 enabled auto-merge (squash) November 16, 2026 20:01
@DanRod1999

Copy link
Copy Markdown
Contributor Author

/azp run imodel-native

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@DanRod1999
DanRod1999 merged commit 72a9ce5 into main Nov 19, 2026
23 checks passed
@DanRod1999
DanRod1999 deleted the danrod1999/zlib-1.4 branch November 19, 2026 17:28
@DanRod1999

Copy link
Copy Markdown
Contributor Author

@Mergifyio backport release/5.15.x

@mergify

mergify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

backport release/5.15.x

✅ Backports have been created

Details

Cherry-pick of 72a9ce5 has failed:

On branch mergify/bp/release/5.15.x/pr-1720
Your branch is up to date with 'origin/release/5.15.x'.

You are currently cherry-picking commit 72a9ce5.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   iModelCore/libsrc/compress/CompressNugetLicense.json
	modified:   iModelCore/libsrc/compress/Zlib.mke

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   iModelCore/libsrc/README.md
	both modified:   iModelCore/libsrc/compress/vcpkg-configuration.json
	both modified:   iModelCore/libsrc/compress/vcpkg.json
	both modified:   iModelCore/libsrc/crashpad/vcpkg-configuration.json
	both modified:   iModelCore/libsrc/crashpad/vcpkg.json
	both modified:   iModelCore/libsrc/curl/vcpkg-configuration.json
	both modified:   iModelCore/libsrc/curl/vcpkg.json
	both modified:   iModelCore/libsrc/freetype2/vcpkg-configuration.json
	both modified:   iModelCore/libsrc/freetype2/vcpkg.json
	both modified:   iModelCore/libsrc/png/vcpkg-configuration.json
	both modified:   iModelCore/libsrc/png/vcpkg.json

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

DanRod1999 added a commit that referenced this pull request Nov 20, 2026
Take the zlib/minizip 1.4 pins and vcpkg baseline 98d7375b from #1720,
keeping release/5.15.x's existing freetype and libpng pins.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
DanRod1999 added a commit that referenced this pull request Nov 20, 2026
Bump the zlib/minizip vcpkg pins to 1.4 in every graph that consumes zlib
(compress, png, curl, crashpad, freetype2) and move those registry baselines
to microsoft/vcpkg 98d7375b, the merge of microsoft/vcpkg#54958.

zlib 1.4 renames the MSVC libraries (zs -> libzs, minizips -> libminizips),
so update the Windows archive names in Zlib.mke.

Co-authored-by: Daniel Rodriguez <DanRod1999@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 72a9ce5)

# Conflicts:
#	iModelCore/libsrc/README.md
#	iModelCore/libsrc/compress/vcpkg-configuration.json
#	iModelCore/libsrc/compress/vcpkg.json
#	iModelCore/libsrc/crashpad/vcpkg-configuration.json
#	iModelCore/libsrc/crashpad/vcpkg.json
#	iModelCore/libsrc/curl/vcpkg-configuration.json
#	iModelCore/libsrc/curl/vcpkg.json
#	iModelCore/libsrc/freetype2/vcpkg-configuration.json
#	iModelCore/libsrc/freetype2/vcpkg.json
#	iModelCore/libsrc/png/vcpkg-configuration.json
#	iModelCore/libsrc/png/vcpkg.json

Co-authored-by: Daniel Rodriguez <44824788+DanRod1999@users.noreply.github.com>
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