Skip to content

appimage: link the pinned brotli 1.2.1 into the AppImage's libcurl (#2782) - #2786

Merged
zackees merged 2 commits into
masterfrom
infra/2782-brotli
Oct 28, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/2782-brotli

Conversation

@zackees

@zackees zackees commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

The AppImage's libcurl is now built against the pinned brotli 1.2.1 instead of the AlmaLinux 8 base's 1.0.6, so the shipped libbrotlidec is out of CVE-2026-111497's range. Fixes #2782. Refs #2774, Refs #2211, Refs #926.

RED

9a67806d7 adds ci/test_appimage_brotli_deps.py, which fails on master (4 failures):

FAIL: test_brotli_is_locked_past_the_cve
FAIL: test_brotli_is_on_the_image_paths
FAIL: test_dependencies_are_fetched_before_the_curl_rebuild
FAIL: test_curl_rebuild_sees_the_brotli_prefix

The test pins the three things that decide what curl.spec's --with-brotli links: a locked brotli entry installed at /opt/obs-deps/brotli, that prefix first on the image's PKG_CONFIG_PATH / CMAKE_PREFIX_PATH / LD_LIBRARY_PATH, and the dependency fetch ordered before the RPM rebuild — rpmbuild only sees the prefix through the environment it is given, so fetching afterwards silently links the base's 1.0.6 again.

GREEN

aeecfcded:

  • deps.lock.json gains brotli 1.2.1 at /opt/obs-deps/brotli, sha256 eb4f2214dbc91eb1529e4a61499fce26ae03c06dde10935cdc6e8cf0d1b0793d — read back from the brotli/manifest.json on obs-rust/obs-studio-libs' assets branch (release brotli-1.2.1, 443768 bytes) before pinning, not copied from the issue text.
  • The uv install and the whole prebuilt-dependency block move above the libcurl block, and the RPM rebuild gets PKG_CONFIG_PATH/CMAKE_PREFIX_PATH/LD_LIBRARY_PATH with the brotli prefix first, so --with-brotli resolves 1.2.1.
  • The rebuild now fails loudly instead of silently: it prints pkg-config --modversion libbrotlidec and asserts ldd /usr/lib64/libcurl.so.4 resolves libbrotli* under /opt/obs-deps/brotli/lib. Before, an unlinked brotli was invisible.
  • --with-ca-fallback and the /etc/pki/tls/certs/ca-bundle.crt absence check are untouched. The base stays glibc 2.28 (appimage: target glibc 2.28 (manylinux_2_28 base) and stop bundling glibc #926): this is a dependency substitution, not a base bump.

Verification on the rebuilt artifact (not on source)

Image built from this Dockerfile (docker build -f build-aux/appimage/manylinux/Dockerfile), then the AppImage built with it end to end (build.py --base manylinux --steps version,configure,build,appdir,appimage):

$ pkg-config --modversion libbrotlidec
1.2.1
$ ldd /usr/lib64/libcurl.so.4 | grep brotli
  libbrotlidec.so.1  => /opt/obs-deps/brotli/lib/libbrotlidec.so.1
  libbrotlicommon.so.1 => /opt/obs-deps/brotli/lib/libbrotlicommon.so.1
$ pkg-config --libs libbrotlidec; curl_version() from the image's libcurl
BrotliDecoderVersion=1.2.1
libcurl/7.61.1 OpenSSL/1.1.1k zlib/1.2.11 brotli/1.2.1 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.2.0)

Inside the produced OBS-Studio-Rust-0.1.0-linux-x86_64.AppImage (--appimage-extract):

$ readelf -d usr/lib/libcurl.so.4 | grep brotli
 (NEEDED)  Shared library: [libbrotlidec.so.1]
$ strings / BrotliDecoderVersion via dlopen on usr/lib/libbrotlidec.so.1
BrotliDecoderVersion=1.2.1
$ usr/lib now carries libbrotlicommon.so.1 and libbrotlidec.so.1 (both 1.2.1),
  not the base's 1.0.6 from /usr/lib64
$ check-glibc-floor.py <AppDir> 2.28
check-glibc-floor: all 257 ELF files run on glibc 2.28 with GLIBCXX_3.4.25
$ check_appdir.py <AppDir>
check-appdir: all 7 AppDir paths that AppRun exports exist; PipeWire, gconv and Qt X11/Wayland runtime files are bundled; one libsrt (1.5.7); one libvpx (1.17.0)

./lint clean (== lane lint: ok (48.4s)).

Cross-distro packaged run (the acceptance run)

AppImage run 40686948715 on this branch with platform_tests=true — full app build (obs-browser included), then test-appimage.sh on the target distros:

  • Build AppImage — success (glibc 2.28 image built from this Dockerfile, configure, build, AppDir, AppImage, host-library loader)
  • Test on almalinux:8 — success
  • Test on ubuntu:22.04 — success
  • Test on ubuntu:24.04 — success
  • Test on archlinux:latest — success
  • Test on NixOS — success
  • Publish to GitHub Releases — skipped (expected for a non-master dispatch)

The run was dispatched from aeecfcded; after the rebase onto master the branch head is bff6041d2 and git diff aeecfcded bff6041d2 touches only master's docs/coordinator commit — the three files this PR changes are byte-identical, so the run's artifact is this tree's artifact.

Local gate

ci-lint local-gate run on bff6041d2 (rebased onto 40d717db7): passed in 2311s [lint:run,rust-test:run,cross:run,tier2-linux:run,macos-native:n/a,windows-native:n/a], stamped (tree ad4d7727da9c). HEAD carries the attestation trailers and was pushed unchanged.

The #2211 restore stays a separate change; this PR only makes the shipped brotli safe to restore it against.

Build tooling only: no docs/features.md line.

@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Status from the worker: RED and GREEN are in, the image and AppImage are verified locally, and the PR is a draft only for the cross-distro packaged run.

Dispatching AppImage run 40686948715 on this branch with platform_tests=true — it builds the full app (obs-browser included) and runs test-appimage.sh on AlmaLinux 8, Ubuntu 22.04/24.04 and Arch. That is the acceptance run #2782 asks for; pasting its result here is what marks this ready.

Local evidence on the artifact, not the source: the image's pkg-config --modversion libbrotlidec is 1.2.1, ldd /usr/lib64/libcurl.so.4 resolves libbrotlidec/libbrotlicommon from /opt/obs-deps/brotli/lib, the image's libcurl reports brotli/1.2.1, and the AppImage built from that image carries usr/lib/libbrotli{common,dec}.so.1 at BrotliDecoderVersion=1.2.1 with check-glibc-floor and check_appdir green.

The manylinux image rebuilds libcurl from AlmaLinux's curl source RPM, so
curl.spec's --with-brotli resolves whatever brotli the base ships: 1.0.6,
inside CVE-2026-111497's range. The pinned obs-studio-libs brotli 1.2.1 is
published (brotli-1.2.1, sha256 eb4f2214...) but the image does not use it.

This test pins the three things that make curl link it, and fails on
master: the locked entry at /opt/obs-deps/brotli, that prefix on the
image's CMake, pkg-config and loader paths, and the dependency fetch
ordered before the RPM rebuild (rpmbuild only sees the prefix through its
environment).

uv run python -m unittest ci.test_appimage_brotli_deps
-> 4 failures on this commit, OK with the next one.
…curl (#2782)

The libcurl RPM rebuild now sees the pinned brotli prefix explicitly, and
the dependency fetch runs before it — fetched after, curl.spec's
--with-brotli silently resolved the base's 1.0.6 again, which is inside
CVE-2026-111497's range. The image carries brotli 1.2.1 from
obs-studio-libs at /opt/obs-deps/brotli (sha256 eb4f2214...), on the
CMake, pkg-config and loader paths, so the AppDir closure bundles
libbrotli{common,dec,enc}.so.1 from the prefix instead of /usr/lib64.

The base stays glibc 2.28 (#926): a dependency substitution, not a base
bump. Verified on the rebuilt image, not on source:

  $ pkg-config --modversion libbrotlidec
  1.2.1
  $ ldd /usr/lib64/libcurl.so.4 | grep brotli
  libbrotlidec.so.1 => /opt/obs-deps/brotli/lib/libbrotlidec.so.1
  libbrotlicommon.so.1 => /opt/obs-deps/brotli/lib/libbrotlicommon.so.1
  $ BrotliDecoderVersion() / curl_version()
  BrotliDecoderVersion=1.2.1
  curl=libcurl/7.61.1 OpenSSL/1.1.1k zlib/1.2.11 brotli/1.2.1 ...

Local-Gate: v1 tree=ad4d7727da9cd5ac5380d01d0b1c5173ba639627 secs=2311 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run,macos-native:n/a,windows-native:n/a
Ci-Attestation: {"at":1793193003,"gate":"rust/all/fmt","host":"linux-x86_64","key":"8d266b05e4e12df5d9f0db01026faf3ceac8fd394653ec5c31827775a539fc39","lane":"lint","parents":["526b65ecf8c17d26d9beb4fabf3dbd62fe599c6c"],"secs":43,"stamp":"8dcb3684d2103b6b69705e4c796facca","tree":"ad4d7727da9cd5ac5380d01d0b1c5173ba639627","v":1,"via":"run"}
Ci-Attestation: {"at":1793193003,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"8d266b05e4e12df5d9f0db01026faf3ceac8fd394653ec5c31827775a539fc39","lane":"lint","parents":["526b65ecf8c17d26d9beb4fabf3dbd62fe599c6c"],"secs":43,"stamp":"267601b3fa4969f8b96113a5b1d6f0ae","tree":"ad4d7727da9cd5ac5380d01d0b1c5173ba639627","v":1,"via":"run"}
Ci-Attestation: {"at":1793193003,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"b449b5b93019ad35e0933269cd4f90b335136f1ce02e069109447f023fdc87a5","lane":"rust-test","parents":["526b65ecf8c17d26d9beb4fabf3dbd62fe599c6c"],"secs":492,"stamp":"273307b93dea657b06ae2ed79cf844d7","tree":"ad4d7727da9cd5ac5380d01d0b1c5173ba639627","v":1,"via":"run"}
Ci-Attestation: {"at":1793193003,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"428265f990e35cd7c9f248632cdb1e570266051f705346bd506abd45aeb3b94f","lane":"cross","parents":["526b65ecf8c17d26d9beb4fabf3dbd62fe599c6c"],"secs":220,"stamp":"fe25ad743d9a046325dd50bd614d6cf3","tree":"ad4d7727da9cd5ac5380d01d0b1c5173ba639627","v":1,"via":"run"}
Ci-Attestation: {"at":1793193003,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"428265f990e35cd7c9f248632cdb1e570266051f705346bd506abd45aeb3b94f","lane":"cross","parents":["526b65ecf8c17d26d9beb4fabf3dbd62fe599c6c"],"secs":220,"stamp":"24d9c48b4a7dc9f1408f4578e2867014","tree":"ad4d7727da9cd5ac5380d01d0b1c5173ba639627","v":1,"via":"run"}
Ci-Attestation: {"at":1793193003,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"428265f990e35cd7c9f248632cdb1e570266051f705346bd506abd45aeb3b94f","lane":"cross","parents":["526b65ecf8c17d26d9beb4fabf3dbd62fe599c6c"],"secs":220,"stamp":"c12e39bd0254e11f13b9ea5113427423","tree":"ad4d7727da9cd5ac5380d01d0b1c5173ba639627","v":1,"via":"run"}
Ci-Attestation: {"at":1793193003,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"428265f990e35cd7c9f248632cdb1e570266051f705346bd506abd45aeb3b94f","lane":"cross","parents":["526b65ecf8c17d26d9beb4fabf3dbd62fe599c6c"],"secs":220,"stamp":"035adc10ae253b733ba7a4a3a0968721","tree":"ad4d7727da9cd5ac5380d01d0b1c5173ba639627","v":1,"via":"run"}
Ci-Attestation: {"at":1793193003,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"edb144899746ea80d646d7426f3cd46bb6bb7d9fa6f2db4674da6751501732ae","lane":"tier2-linux","parents":["526b65ecf8c17d26d9beb4fabf3dbd62fe599c6c"],"secs":2311,"stamp":"d5d3eaad31b356b8413a9c60546d40eb","tree":"ad4d7727da9cd5ac5380d01d0b1c5173ba639627","v":1,"via":"run"}
@zackees
zackees marked this pull request as ready for review October 28, 2026 13:22
@zackees
zackees added this pull request to the merge queue Oct 28, 2026
@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator.

Ready state:

  • Rebased onto origin/master (40d717db7); head bff6041d2.
  • Local gate: passed in 2311s [lint:run,rust-test:run,cross:run,tier2-linux:run,macos-native:n/a,windows-native:n/a], stamped tree ad4d7727da9c, pushed unchanged (that is why Fast Gate is skipping in the PR run and CI Gate ✅ is green).
  • Acceptance run 40686948715 (platform_tests=true) is green end to end: the glibc-2.28 image built from this Dockerfile, the full app build, then test-appimage.sh on AlmaLinux 8, Ubuntu 22.04, Ubuntu 24.04 and Arch, plus the NixOS wrap. The run predates the rebase by master's docs/coordinator commit only; the three changed files are byte-identical (git diff aeecfcded bff6041d2 touches nothing in them).
  • Body now says Fixes #2782 (all four work items are done); the restore: brotli back on outgoing calls (CURLOPT_ACCEPT_ENCODING "") once CVE-2026-111497 is fixed #2211 restore stays separate.
  • Also queued for merge.

Nothing outstanding on my side unless the queue ejects it.

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

infra: link the pinned brotli 1.2.1 into the AppImage's libcurl build and bundle it (#2774 slice 2)

1 participant