Skip to content

outgoing calls: stop advertising br on Accept-Encoding (CVE-2026-111497) - #2213

Merged
zackees merged 3 commits into
masterfrom
fix/no-brotli-outgoing-calls
Oct 24, 2026
Merged

zackees merged 3 commits into
masterfrom
fix/no-brotli-outgoing-calls

Conversation

@zackees

@zackees zackees commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

1|1|Refs #2211 (restore), private advisory GHSA-c2vc-wwm8-6gx9.
2|2|
3|3|### What and why
4|4|
5|5|Our outgoing HTTP calls passed CURLOPT_ACCEPT_ENCODING, "", which tells
6|6|libcurl to advertise every encoding it was built with — br included.
7|7|Our curl builds link Brotli 1.2.0, inside the range affected by
8|8|CVE-2026-111497 (Google Brotli 1.0.3–1.2.0, out-of-bounds write in
9|9|c/dec/decode.c; a crafted brotli stream corrupts decoder state memory).
10|10|A remote endpoint we fetch may therefore answer brotli-compressed and drive
11|11|that decoder with attacker-chosen bytes.
12|12|
13|13|This PR pins the three call sites to gzip, deflate — brotli is never
14|14|requested, so a brotli body never reaches the decoder. It is a stop-gap with
15|15|an expiry date: #2211 restores "" once the linked Brotli is past the
16|16|vulnerable range.
17|17|
18|18|The three sites:
19|19|
20|20|| Site | Path |
21|21||---|---|
22|22|| file-updater downloads | shared/file-updater/file-updater/file-updater.c.h |
23|23|| remote text GET | frontend/utility/RemoteTextThread.cpp.hpp |
24|24|| remote text request | frontend/utility/RemoteTextThread.cpp.hpp |
25|25|
26|26|Verified with rg 'CURLOPT_ACCEPT_ENCODING': these are the only three, and
27|27|none of them passes an explicit list today.
28|28|
29|29|> The Discord report cited "CVE-2026-11497"; that ID is a D-Link Boa
30|30|> webserver issue. The Brotli flaw is CVE-2026-111497.
31|31|
32|32|### RED → GREEN
33|33|
34|34|test/cmocka/test_file_updater_failure already runs a real localhost HTTP
35|35|server that reads the request off the wire, so the new assertion reads the
36|36|Accept-Encoding: header that curl actually sent and fails if it lists br.
37|37|
38|38|RED (product fix stashed, only the new assertion in the tree) — built and
39|run locally, ctest -R '^test_file_updater_failure$':
40|
41| 42|[ RUN ] successful_download_reaches_confirm 43|[ ERROR ] --- lists_coding(accept_encoding, "br") 44|[ LINE ] --- test/cmocka/test_file_updater_failure.c:218: error: Failure! 45|[ FAILED ] successful_download_reaches_confirm 46| 1 FAILED TEST(S) 47|
48|
49|So against CURLOPT_ACCEPT_ENCODING, "", this box's curl 8.21.0 (built with
50|brotli/1.2.0) really does put br in the Accept-Encoding header of our
51|outgoing request — the exposure is observed on the wire, not inferred.
52|
53|39|
54|40|GREEN (three call sites pinned to gzip, deflate), same build, same test:
55|
56| 57|1/1 Test #49: test_file_updater_failure ........ Passed 0.04 sec 58|100% tests passed, 0 tests failed out of 1 59|
60|
61|Local setup: plain CMake configure (ENABLE_UNIT_TESTS=ON,
62|ENABLE_FRONTEND=OFF, ENABLE_ZCCACHE=OFF because no soldr broker is
63|running in this session) with cmocka 1.1.7 built from source into a scratch
64|prefix. The local gate was not stamped — PR CI should run the Linux test
65|jobs.
66|
67|41|
68|42|### Scope notes
69|43|
70|44|- The empty string also advertised zstd; gzip, deflate drops that too.
71|45| Both remain available on request — only the "everything" default goes.
72|46|- No behaviour change for servers that ignore Accept-Encoding or answer
73|47| identity/gzip.
74|48|
75|49|### Checklist
76|50|
77|51|- [x] Base is master
78|52|- [x] Characterization test first, then RED, then GREEN commits
79|53|- [x] User-visible change: its line in docs/features.md is added or updated (commit b1d1844bc, Security hardening)
80|54|- [ ] Local gate stamped (not run here: this clone has no soldr/zccache broker;
81|55| PR CI runs the Linux test jobs)
82|56|- [ ] Warning or flag changes: n/a (no -W or ratchet changes)
83|57|- [ ] Intentional differences from C: n/a (no port)

The file-updater test already speaks HTTP to a localhost server; read the
Accept-Encoding header the client actually sent and fail when it lists br,
which is what CURLOPT_ACCEPT_ENCODING "" produces against a curl built
with brotli (CVE-2026-111497, GHSA-c2vc-wwm8-6gx9). RED against the
current code, GREEN once the three call sites pin their encodings.
CURLOPT_ACCEPT_ENCODING "" advertised every encoding libcurl was built
with, br included, so any endpoint we fetch could answer brotli and drive
the decoder with a public out-of-bounds write (CVE-2026-111497). Pin the
three call sites to "gzip, deflate" until the linked Brotli is past the
vulnerable range; #2211 restores the old behaviour.
@zackees
zackees added this pull request to the merge queue Oct 24, 2026
Merged via the queue into master with commit 4dd2d6e Oct 24, 2026
35 checks passed
@zackees
zackees deleted the fix/no-brotli-outgoing-calls branch October 26, 2026 15:44
vpacher pushed a commit to vpacher/obs-studio that referenced this pull request Oct 26, 2026
…es (obs-rust#2453) (obs-rust#2454)

* test: outgoing calls ask only for codings the linked libcurl decodes (RED, obs-rust#2453)

obs_curl_accept_encoding() is a stub returning today's "gzip, deflate" for
every libcurl; the no-zlib cases fail.

* file-updater, frontend: Ask only for codings the linked libcurl decodes (GREEN, obs-rust#2453)

obs-rust#2213 pinned the three outgoing call sites to "gzip, deflate" so br is never
advertised. Windows' bundled libcurl (Schannel) has no zlib, cannot decode
the gzip obsproject.com and googleapis.com send back, and failed those
transfers with CURLE_BAD_CONTENT_ENCODING: no service or capture list
updates, no YouTube API calls. obs_curl_accept_encoding() sends gzip and
deflate when curl_version_info() reports CURL_VERSION_LIBZ, else identity,
and never br.
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.

1 participant