Skip to content

SECURITY: microvm-rootfs: libexpat 2.10.0-r0 (4 CVEs), zlib 1.4-r0 override (CVE-2026-85091, CVE-2026-4738) - #1380

Merged
bryan-minimal merged 4 commits into
mainfrom
microvm-rootfs-libexpat
Nov 10, 2026
Merged

bryan-minimal merged 4 commits into
mainfrom
microvm-rootfs-libexpat

Conversation

@bryan-minimal

@bryan-minimal bryan-minimal commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Two security fixes to the microvm-rootfs guest image:

  • libexpat 2.9.0-r0 -> 2.10.0-r0 (closure pin). alpine-pins (nightly 2026-11-04 through 11-06) reports CVE-2026-113351, CVE-2026-115506, CVE-2026-117610 and CVE-2026-118370, all fixed in 2.10.0-r0 per the v3.24 secdb.
  • zlib 1.3.2-r0 -> 1.4-r0 (new base-layer override). The guest's zlib comes from alpine-minirootfs-3.24.1 (its lib/apk/db/installed records zlib 1.3.2-r0), not from the closure. The v3.24 secdb lists CVE-2026-85091 as fixed in 1.3.2-r1 and CVE-2026-4738 as fixed in 1.4-r0. git and libcurl link so:libz.so.1, so the guest loads it. alpine-pins only reads the apk pins, never the minirootfs db, so it did not report this.

zlib goes in the override group next to musl / libssl3 / ca-certificates-bundle. build.sh unpacks the minirootfs first and then overlays every .apk with tar -xof, so the overlay replaces usr/lib/libz.so.1; the apk-db reconcile then rewrites zlib's recorded V: to 1.4-r0 (and fails the build if it doesn't land). In the v3.24 APKINDEX, libexpat-2.10.0-r0 and zlib-1.4-r0 depend only on so:libc.musl-<arch>.so.1, and sonames are unchanged (so:libexpat.so.1, so:libz.so.1), so nothing else moves.

zlib's real file is renamed between versions (libz.so.1.3.2 -> libz.so.1.4). The overlay replaces the libz.so.1 symlink, so the loader gets 1.4, but the old usr/lib/libz.so.1.3.2 file stays on disk, unreferenced, because build.sh only adds and replaces paths. A file-level scanner may still flag it (a false positive, not a missed CVE). Removing base-layer files an override no longer ships would be a build.sh change; I left it out of this PR.

c-ares stays at 1.34.8-r0. An earlier revision of this PR bumped it to 1.34.9-r0, but that build has no secfix, nothing in the APKINDEX needs it (libcurl depends on unversioned so:libcares.so.2), and 1.34.8-r0 is already mirrored.

Alternative not taken: moving alpine_release to 3.24.4 (now the latest release) might carry the zlib fix in the base layer and let some overrides go. It's a bigger change, and its minirootfs isn't mirrored either.

Mirrored

All four objects are on the staging mirror and serve the sha256s below (re-checked 11-09; agent-137 checked them independently).

Mirror object sha256
alpine/v3.24/main/aarch64/libexpat-2.10.0-r0.apk 99144fe0b1bb9316a3bc30c38707996767806661f4a0456fcf4565ac92e79b0f
alpine/v3.24/main/x86_64/libexpat-2.10.0-r0.apk e7e7408ea787ed06d00159b0ff1f9b65a63cf634f36d9e0fa7512ce2c489a503
alpine/v3.24/main/aarch64/zlib-1.4-r0.apk d3e30d012a3445222b0b4a28f1d4d97ce67387f8b48561921111696da174f0de
alpine/v3.24/main/x86_64/zlib-1.4-r0.apk 7b05bc778b8b25cd880835b40114182bd4d1581717504d0129c810c0a14291cb

How the sha256s were checked: each was computed from a dl-cdn download, and an independent reviewer got the same values from their own download. The libexpat files' sizes match the APKINDEX S: field and their control-segment SHA-1 matches C:. I didn't verify the APKINDEX's own Alpine signature. Nothing was built locally, and CI doesn't fetch the gs:// sources, so a green CI run doesn't show the image builds. nickel format is clean.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated bundled system libraries to newer versions, including architecture-specific builds. This refreshes the components included in the application’s base environment.

Update: review follow-ups (bb3b2a4)

  • Overrides now expire in the build. build.sh's OVERRIDE_BASE records the base-layer version each override replaces (read from the 3.24.1 minirootfs db, both arches: libcrypto3/libssl3 3.5.7-r0, ca-certificates-bundle 20260611-r0, musl/musl-utils 1.2.6-r2, zlib 1.3.2-r0). The build fails when the minirootfs records anything else, or when an overlay replaces a base package that has no line. So moving alpine_release forces every override to be re-decided, instead of silently pinning the image below a newer base.
  • The orphaned libz.so.1.3.2 is removed after the overlay, and zlib's db file entry moves to libz.so.1.4. The paragraph above about it staying on disk no longer applies.
  • The "no 3.24.2" comment is corrected. 3.24.4 exists and records every override's fix except zlib 1.4-r0 (it has 1.3.2-r1, which lacks CVE-2026-4738). Moving to 3.24.4 will be a follow-up PR: it needs the 3.24.4 minirootfs mirrored on both arches, and this fix shouldn't wait on that.

Exercised the new build.sh sections against the real 3.24.1 x86_64 minirootfs and the zlib-1.4-r0 apk: the positive run reconciles and removes the orphan; a base layer with zlib 1.4-r1 fails; an override of a base package with no table line fails. The full image is proved by the build bot's run on this head.

🤖 Generated with Claude Code

alpine-pins flags libexpat-2.9.0-r0 as missing fixes for CVE-2026-113351,
CVE-2026-115506, CVE-2026-117610 and CVE-2026-118370, all fixed in
2.10.0-r0. c-ares 1.34.8-r0 -> 1.34.9-r0 is the only other stale pin in
the closure (no recorded security fix) and rides along.

Both new builds depend only on so:libc.musl in the v3.24 APKINDEX, so
nothing else in the closure moves. sha256s computed from
dl-cdn.alpinelinux.org downloads whose size and control checksum match
the APKINDEX. The four objects are not yet mirrored to
gs://minimal-staging-archives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The rootfs package declarations update the pinned Alpine libexpat version and add a documented zlib security override. Both packages have architecture-specific digests.

Changes: MicroVM rootfs package pins

Layer / File(s) Summary
Update pinned Alpine packages
packages/microvm-rootfs/build.ncl
The libexpat pin changes to 2.10.0-r0 with updated architecture-specific digests. The declarations add zlib-1.4-r0 with architecture-specific digests and comments about the override and library symlink.

Estimated code review effort: 2 (Simple) | ~8 minutes

Suggested reviewers: norrietaylor

Merge Risk: Minimal · up to 594dd

No actionable merge-blocking issue is established. The rootfs image still needs a build using the mirrored APKs before release.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the security updates to libexpat and zlib in microvm-rootfs, including the relevant versions and CVEs.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7a198f0 and 594dd35.

Files selected for processing: 1

  • packages/microvm-rootfs/build.ncl

Included review availability: This review used your included allowance. 1 included review remains after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

…s); keep c-ares

alpine-minirootfs-3.24.1 ships zlib 1.3.2-r0, which the v3.24 secdb lists
as missing CVE-2026-85091 (fixed 1.3.2-r1) and CVE-2026-4738 (fixed
1.4-r0). alpine-pins only reads the apk pins, so it never reported it. git
and libcurl link so:libz.so.1, so the guest loads it.

Overlay zlib-1.4-r0 in the base-layer override group, next to musl /
libssl3 / ca-certificates-bundle. build.sh unpacks the minirootfs first and
overlays every .apk after it, replacing the libz.so.1 symlink, and its
apk-db reconcile moves the recorded V: to 1.4-r0. zlib-1.4-r0 depends only
on so:libc.musl. sha256s are from dl-cdn downloads.

Revert c-ares to 1.34.8-r0: 1.34.9-r0 carries no secfix, nothing in the
APKINDEX requires it (libcurl depends on unversioned so:libcares.so.2), and
1.34.8-r0 is already mirrored, so this drops two objects from the mirror
list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal bryan-minimal changed the title SECURITY: microvm-rootfs: libexpat 2.10.0-r0 (4 CVEs), c-ares 1.34.9-r0 SECURITY: microvm-rootfs: libexpat 2.10.0-r0 (4 CVEs), zlib 1.4-r0 override (CVE-2026-85091, CVE-2026-4738) Nov 7, 2026
libexpat-2.10.0-r0 and zlib-1.4-r0 (aarch64 + x86_64) are now on
gs://minimal-staging-archives with the sha256s in build.ncl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal marked this pull request as ready for review November 9, 2026 16:05
@bryan-minimal
bryan-minimal requested a review from a team as a code owner November 9, 2026 16:05

@agent-137 agent-137 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review on Karl's behalf. This is a comment, not an approval. Nothing was built for it. The findings come from reading the declarations and fetching upstream sources, and each one says how it was checked. The CI rollup on this head is now SUCCESS.

CI: 15/15 green, CodeRabbit SUCCESS ("no actionable comments"), no human reviews, not a draft. The PR body itself says CI does not fetch the gs:// sources, so the green run does not show that the image builds.

Verified clean:

  • Hashes: all four sha256s match fresh dl-cdn downloads. The staging mirror now serves all four objects with the same sha256s. The argument order (arm64 first, then amd64) matches the apk helper.
  • CVE claims: they agree with secdb.alpinelinux.org/v3.24/main.json.
    • expat 2.10.0-r0 fixes CVE-2026-113351, -115506, -117610 and -118370.
    • zlib 1.3.2-r1 fixes CVE-2026-85091, and 1.4-r0 fixes CVE-2026-4738.
    • c-ares 1.34.8-r0 is the newest secfix entry, so keeping 1.34.8 is right.
  • CVE IDs: none is malformed. CVE-2026-4738 has a low sequence number for November, but the format is valid and it appears in the secdb.
  • Base layer: the mirrored alpine-minirootfs-3.24.1-x86_64.tar.gz matches its pinned sha256, and its db records zlib V:1.3.2-r0, as the PR says. The zlib-1.4-r0 apk ships only usr/lib/libz.so.1 and usr/lib/libz.so.1.4, so the file rename the PR describes is real.

Should-fix

  1. packages/microvm-rootfs/build.ncl:248-256 and :322-336: a release bump exists, and the comment says it does not. The comment says "the newest minirootfs RELEASE is still 3.24.1 … There is no 3.24.2 to move to". Alpine v3.24/releases/x86_64/latest-releases.yaml now lists 3.24.4. The lib/apk/db/installed in alpine-minirootfs-3.24.4-x86_64.tar.gz already records:

    • ca-certificates-bundle 20261020-r0
    • libcrypto3/libssl3 3.5.9-r0
    • musl/musl-utils 1.2.6-r3
    • zlib 1.3.2-r1

    So every existing override is redundant at 3.24.4. zlib 1.4-r0 still needs an override there, because CVE-2026-4738 is not fixed in 1.3.2-r1. The zlib override in this PR is justified, and the libexpat change is a proper closure upgrade. The right fix overall is to move alpine_release to 3.24.4 and keep only the zlib override. The PR body's line "might carry the zlib fix" is half right. Fix the stale comment in this PR, or open a tracked follow-up, so the next reader does not trust "no 3.24.2". Verified by downloading the 3.24.4 x86_64 minirootfs from dl-cdn. aarch64 was not checked.

  2. build.ncl:336 and build.sh:128-160: the override has no expiry check, so it can stay forever. "DROP THIS once…" is only a comment. The reconcile rewrites V: to whatever the overlay installed, and the fail-closed loop only checks that the rewrite landed. It never compares that version with the base layer's version. Failure scenario: someone bumps alpine_release to a minirootfs that ships zlib 1.4-r1 or later and forgets this entry. The overlay then silently downgrades libz. The db is rewritten to 1.4-r0, and the build passes. The openssl comment at :265-267 names exactly this risk ("pinned BELOW its base layer"). The pattern predates this PR, but this PR adds another instance of it. Suggested fix: record the expected base version for each override (for example zlib 1.3.2-r0), and fail the build when the base db records anything else. That turns the DROP comment into a build failure. A tracking issue is an acceptable alternative. Verified by reading build.sh at PR head.

  3. build.ncl:329-334: the old vulnerable libz stays on disk, and the db file list goes stale. The overlay leaves usr/lib/libz.so.1.3.2 on disk. That is the 1.3.2-r0 binary without the CVE-2026-85091 fix. After the reconcile, the db stanza reads P:zlib V:1.4-r0 but still lists R:libz.so.1.3.2 and not libz.so.1.4. Failure scenario: a file-level scanner (a binary cataloger) finds libz 1.3.2 in the image and reports CVE-2026-85091 and CVE-2026-4738 on an image whose fix is exactly those two CVEs. That leads to repeat triage or an alert people learn to ignore. The PR discloses this and defers it. The fix is one line in build.sh (remove usr/lib/libz.so.1.3.2 after the overlay, guarded on the zlib override). That is cheap enough to do in this PR, or track it in a filed issue. Verified from the base db stanza and the apk file listing.

Nit

  • PR body is stale. "Draft until these four objects are mirrored … a public HEAD returns 404 for all four" is no longer true. The mirror serves all four with matching hashes (I checked), and the PR is not a draft. Update the body before merge so the record is accurate.

Verdict #1380: the pins and CVE claims are correct and verified. Mergeable as a fast security fix, once the stale "no 3.24.2" comment is fixed or tracked, and with follow-ups for the override expiry check and the orphaned libz.so.1.3.2. The build itself is unverified.

….so.1.3.2

Review (agent-137 on #1380):
- build.sh records the base-layer version each override replaces
  (OVERRIDE_BASE, read from the 3.24.1 minirootfs db on both arches) and
  fails when the minirootfs records anything else, or when an overlay
  replaces a base package with no line. A DROP THIS comment becomes a
  build failure instead of a silent downgrade below a newer base.
- After the overlay, only the file libz.so.1 points at is kept: the base
  layer's libz.so.1.3.2 is removed and zlib's db entry moves to
  libz.so.1.4, so a file scanner does not report the fixed CVEs.
- The comment no longer says there is no newer minirootfs: 3.24.4 exists
  and retires every override but zlib 1.4-r0 (a follow-up).

Exercised the new build.sh sections against the real 3.24.1 x86_64
minirootfs and zlib-1.4-r0 apk: positive run reconciles and removes the
orphan; base zlib moved to 1.4-r1 fails; an untabled base override fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@norrietaylor norrietaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Scope matches the title and the update note. The diff bumps the libexpat closure pin, adds a zlib base-layer override, adds the OVERRIDE_BASE expiry check, and adds the orphaned libz.so.1.3.2 cleanup. Clobber none. git log on packages/microvm-rootfs shows the recent musl, ca-certificates-bundle, brotli and libcurl security commits, and this diff keeps all of them. Correctness The OVERRIDE_BASE table matches every base-layer override in build.ncl: libcrypto3, libssl3, ca-certificates-bundle, musl, musl-utils and zlib. No closure pin replaces any other minirootfs package. The two checks run after the -s "$DB" guard and before the reconcile, so they read the base-layer V: values. The reverse check makes the build fail when a new override has no table line. In the orphan cleanup, the libz.so.1.* glob always matches the live file, so it never runs on a literal pattern. A relative readlink target resolves correctly, and an absolute one fails closed. The zlib stanza rewrite only touches R: lines in the zlib stanza. The new sha256 values match the values in the PR body. Not checked The image build and the gs:// fetch of the new objects. Both need a build.

# 3.24.1, so bumping `alpine_release` could not pick the fix up. 3.24.4 has
# since been released and records libcrypto3/libssl3 3.5.9-r0, musl 1.2.6-r3,
# ca-certificates-bundle 20261020-r0 and zlib 1.3.2-r1, so moving to it
# retires every override here except zlib 1.4-r0 (tracked separately).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit · The comment says zlib 1.4-r0 is "tracked separately", but it names no issue. The PR body says that the 3.24.4 move is a later PR. Link the issue that tracks the move here. Then the next reader can find out when this block and the OVERRIDE_BASE lines can go.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 7e841d8 Nov 10, 2026
15 checks passed
@bryan-minimal
bryan-minimal deleted the microvm-rootfs-libexpat branch November 10, 2026 23:30
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.

3 participants