[High] Patch python-urllib3 for CVE-2025-66471#16158
[High] Patch python-urllib3 for CVE-2025-66471#16158akhila-guruju wants to merge 5 commits intomicrosoft:fasttrack/2.0from
Conversation
a4fa87f to
4e61897
Compare
|
re hitting full build |
Updated patch references for CVE-2025-66471.
CVE Patch Review: PR #16158 — Patch python-urllib3 for CVE-2025-66471PR: #16158 CVE Summary
Spec File Review
Patch VerificationPatch Origin & Structure
The PR patch is a consolidated backport based on the Rocky Linux reference patch, which itself is a 5-commit series cherry-picked and adapted for v1.26.19:
Files Modified in Patch
Core Security Fix Analysis (
|
| Check | Status |
|---|---|
| PR CI checks | ✅ 13/13 passed |
| Buddy build (1067142) | ✅ Linked in PR |
| Full build (1067260) | ✅ Linked in PR conversation |
Note: Azure DevOps build logs require authentication and could not be directly inspected. Build status is confirmed from PR conversation and GitHub checks.
Test Coverage
The patch includes comprehensive test coverage:
TestBytesQueueBuffer— Unit tests for the new buffer class (single chunk, read too much, multiple chunks, memory usage)test_cache_content/test_cache_content_preload_false— Updated to use bytes, added preload_content=False varianttest_read_with_all_data_already_in_decompressor— Parametrized across deflate/gzip/brotli; verifies progressive decompression when all data is already bufferedtest_decode_with_max_length_close_to_compressed_data_size— Parametrized boundary test with delta=0 and delta=-1test_memory_usage_decode_with_max_length— Memory limit test (10 MB) across read/read_chunked/stream methods against 50 MB compressed payloads — validates the fix prevents decompression bombstest_read_multi_decoding_deflate_deflate— Tests chained multi-decoder with progressive readstest_buffer_memory_usage_decode_one_chunk— Validates memory bounds for single-chunk decode (25 MB limit)test_buffer_memory_usage_no_decoding— Validates memory bounds without decoding (10.5 MB limit)- Updated streaming tests to match new behavior (e.g.,
b"fo"+b"o"instead ofb"f"+b"oo") - Updated
tell()position tests with hardcoded expected values
PR Description Checklist
- Summary provided with clear explanation of backport decisions
- CVE link (NVD + GHSA)
- Upstream patch URL referenced
- Rocky Linux reference patch URL referenced
- Buddy build URL provided
- Full build URLs provided (2 full builds)
- Merge checklist present
-
read1()exclusion documented -
zstdtest exclusion documented
Minor Observations
- Associated issues: PR lists
#xxxxas placeholder — should be updated with actual tracking issue if one exists. noxfile.pychanges: Thetest_brotlipysession addition modifies the test infrastructure. This is part of the upstream security fix to ensure brotlipy fallback works correctly — no concern.- Memory limit tests (
@pytest.mark.limit_memory): These tests requirepytest-memraywhich may not be available in all build environments. They should gracefully skip if the marker is not recognized.
APPROVED — Patch correctly backported from upstream with proper exclusions documented. All security-critical decompression bomb mitigations are present. CI checks pass. LGTM.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
Patch python-urllib3 for CVE-2025-66471
Patch Backported: Yes
In
noxfile.pysome syntax changes were made because python version in 2.0 is 3.9.x.
In
response.pynew class
class BytesQueueBufferhas been added inresponse.pyfile and related tests were also added intest_response.py.read()API was backported as per the upstream reference, new API call_raw_readwas backported as it was used in backportedread()API.read1()API is not present in this codebase. So, changes made for read1() API in upstream patch are not present in backport patch.In
test_response.pytestcases for
zstdare not backported/patched, because this encoding method is not used in v1.26.19 codebase and no testcases were present in test file.Upstream Patch: https://github.com/urllib3/urllib3/commit/c19571de34c47de3a766541b041637ba5f716ed7.patch
Reference has been taken from Redhat patch: r10s/python-urllib3-1.26.19-3.el10/SOURCES/CVE-2025-66471.patch
redhat patch is taken as reference, there are some files which azl doesn't need, like these are particularly for redhat. So, did not include those files (like
changelog/2128.removal.rst)the test file
test/with_dummyserver/test_socketlevel.pyis not added because, the test folder is being removed in the %prep section of spec.Change Log
Does this affect the toolchain?
NO
Associated issues
Links to CVEs
Test Methodology