Repository navigation
Switch UBI image from ubi9-minimal to ubi9-micro - #331
Merged
Merged
Conversation
The operator is a static Go binary and only needs a shell, coreutils and the CA bundle at runtime. Build a rootfs holding coreutils-single and ca-certificates with microdnf --installroot in a build stage and copy it onto ubi9-micro. rpm, microdnf, curl-minimal and their dependency chain (libxml2, glib2, libarchive, openssl-libs, util-linux libs) no longer ship in the image. coreutils-single is requested explicitly, otherwise coreutils pulls in openssl-libs again. Result: 31 packages instead of ~109, 120 MB instead of 170 MB. Operator startup, the CA bundle and an arbitrary UID were checked on arm64 and amd64. CVEs removed from the image (Red Hat has no fix released for any of them): - BDSA-2022-1336: curl bearer token memory leak (no CVE id in the report) - CVE-2026-5773: libcurl reuses wrong connection for SMB transfers - CVE-2026-6276: libcurl stale Host: header leaks cookies on handle reuse - CVE-2026-8932: libcurl reuses connection after mTLS option change - CVE-2026-18924: libcurl HTTP/2 Server Push use-after-free on cleanup - CVE-2026-19931: libcurl reuses Negotiate connection with empty credentials - CVE-2026-80230: libcurl does not enforce pinned public key without verify - CVE-2026-82209: libcurl Public Suffix List bypass in Set-Cookie Domain - CVE-2026-1484 (BDSA-2026-1153): glib2 g_base64_encode() integer overflow - CVE-2026-1485 (BDSA-2026-1152): glib2 treemagic parse_header() underflow - CVE-2026-4426 (BDSA-2026-5247): libarchive zisofs shift out-of-bounds - CVE-2025-27113 (BDSA-2025-1294): libxml2 xmlPatMatch NULL dereference - CVE-2026-42772 (BDSA-2026-35489): OpenSSL QUIC stream reassembly - CVE-2026-72897 (BDSA-2026-35764): OpenSSL TLS 1.3 signature_algorithms OOB - CVE-2026-84837 (BDSA-2026-31377): rpm rpmbuild -t* command injection - CVE-2026-95521 (BDSA-2026-35043): rpm source RPM %() macro command injection - CVE-2026-95519 (BDSA-2026-35042): rpm manifest %() macro command injection - BDSA-2026-28059: util-linux libblkid DOS partition parser integer overflow (the report cites CVE-2026-53615, unknown to Red Hat) Still present: CVE-2026-89161 (pcre2 pcre2_jit_match incorrect free). pcre2 is part of ubi9-micro itself (required by libselinux) and Red Hat has no fix yet. AI-Tool-Used: Claude Code AI-Tool-Use-Level: high AI-Code-Category: production Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ggverma
previously approved these changes
Oct 14, 2026
salv-orlando
dismissed
ggverma’s stale review
October 15, 2026 04:59
The merge-base changed after approval.
dantingl
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switch UBI image from ubi9-minimal to ubi9-micro
Summary
The operator is a static Go binary (
CGO_ENABLED=0). At runtime it only needs a shell, coreutils and the CA bundle. This PR moves the final image fromubi9/ubi-minimaltoubi9/ubi-micro, which removes the package manager and everything it drags in (rpm,microdnf,curl-minimal,libxml2,glib2,libarchive,openssl-libs, util-linux libs).This is the clean alternative to removing packages in place (
rpm -e --nodeps, as attempted in 7eaa5ac):rpm-libsandlibcurl-minimalare hard dependencies ofmicrodnf, so they can't be removed onubi-minimalwithout breaking the package manager.What changed (
build/Dockerfile)rootfsbuild stage onubi-minimalthat installscoreutils-singleandca-certificatesinto an empty root withmicrodnf --installroot.ubi9/ubi-micro, with that rootfs copied on top.coreutils-singleis requested explicitly. Without it the resolver picks the fullcoreutils, which linkslibcryptoand pullsopenssl-libsback in.microdnf3.9 requires--config,--nopluginsand--setoptvalues forcachedir,reposdirandvarsdirwhenever--installrootis used.rpm/microdnf/curlCVEs removed from the image
Red Hat has not released a fix for any of these, so they could not be fixed by rebuilding on a newer base.
Host:header leaks cookies on handle reuseSet-CookieDomaing_base64_encode()integer overflowparse_header()buffer underflowxmlPatMatchNULL dereferencesignature_algorithmsout-of-bounds writerpmbuild -t*command injection%()macro command injection%()macro command injectionlibblkidDOS partition parser integer overflow. The report cites CVE-2026-53615, which Red Hat has no record ofStill present
pcre2_jit_matchincorrect free).pcre2is part ofubi9-microitself, becauselibselinuxrequires it. Red Hat lists it as Affected with no fix yet.Testing
build/Dockerfileonlinux/arm64andlinux/amd64pcre2--user 1234:0)/etc/pki/tls/certs/ca-bundle.crt(146 certificates), so the system-roots fallback ingetConnectorTLSConfigstill worksmake test-e2epassesNotes for reviewers
rpm,microdnforcurl, so tools can't be installed in a running pod./bin/bashis still available.ubi-minimalcontainer that shares the operator's PID namespace and hasCAP_SYS_PTRACE. Then inspect withrpm --root /proc/1/root -qa.rootfsstage needs network access to the UBI repos at build time, as the oldubi-minimalimage already did. The base is still the unpinned:latesttag.AI Assistance
🤖 Generated with Claude Code