Repository navigation
outgoing calls: stop advertising br on Accept-Encoding (CVE-2026-111497) - #2213
Merged
Merged
Conversation
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.
7 tasks
6 of 7 tasks
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.
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.
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 tells6|6|libcurl to advertise every encoding it was built with —
brincluded.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 never14|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 the16|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, and27|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_failurealready runs a real localhost HTTP35|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 listsbr.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 with50|
brotli/1.2.0) really does putbrin theAccept-Encodingheader of our51|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=OFFbecause no soldr broker is63|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, deflatedrops that too.71|45| Both remain available on request — only the "everything" default goes.
72|46|- No behaviour change for servers that ignore
Accept-Encodingor answer73|47| identity/gzip.
74|48|
75|49|### Checklist
76|50|
77|51|- [x] Base is
master78|52|- [x] Characterization test first, then RED, then GREEN commits
79|53|- [x] User-visible change: its line in
docs/features.mdis added or updated (commitb1d1844bc, 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
-Wor ratchet changes)83|57|- [ ] Intentional differences from C: n/a (no port)