Skip to content

[AutoPR- Security] Patch libsoup for CVE-2026-77014 [MEDIUM] - #18600

Draft
Azure Linux Security Servicing Account (azurelinux-security) wants to merge 3 commits into
microsoft:3.0-devfrom
azurelinux-security:azure-autosec/libsoup/3.0/1189685
Draft

[AutoPR- Security] Patch libsoup for CVE-2026-77014 [MEDIUM]#18600
Azure Linux Security Servicing Account (azurelinux-security) wants to merge 3 commits into
microsoft:3.0-devfrom
azurelinux-security:azure-autosec/libsoup/3.0/1189685

Conversation

@azurelinux-security

@azurelinux-security Azure Linux Security Servicing Account (azurelinux-security) commented Aug 25, 2026

Copy link
Copy Markdown

Auto Patch libsoup for CVE-2026-77014.

Autosec pipeline run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=1189685&view=results

CVE-2026-77014 : Single Patch Backporter Pipeline Run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=1189691&view=results

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

What does the PR accomplish, why was it needed?

Change Log
Does this affect the toolchain?

YES/NO

Associated issues
  • N/A
Links to CVEs
Test Methodology

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@v-swapsahu

v-swapsahu commented Sep 3, 2026

Copy link
Copy Markdown

Patch Analysis — CVE-2026-77014 (libsoup 3.4.4)

Backported: Yes

e82c13ba: — CWE-197 numeric truncation. sort_ranges() returned a 64-bit offset difference as a 32-bit int
For differences > INT_MAX the value wraps negative, so qsort sorts ranges backwards and the coalesce step drops a range. Impact: on resources > 2 GB, multi-range requests return the wrong bytes.

Fix — compare in full 64-bit, return -1/0/1:
Same commit also adds a MAX_RANGES (200) cap rejecting over-long range lists, plus tests /ranges/parsing, /ranges/count, /server-mem/range-overlaps.

6ece9e52 — validate Content-Range when parsing. soup_message_headers_get_content_range() parsed offsets with raw g_ascii_strtoull into signed goffset with no overflow check (values > G_MAXINT64 wrap negative; leading - accepted; no end ≥ start / end < total checks).

Fix — adds a parse_content_range_offset() helper (rejects ERANGE/> G_MAXINT64) and range validation. Ships with its upstream regression test /ranges/content-range.

546a59d - RFC 416416 responses now report the resource length as Content-Range: bytes */<total> (new set_content_range_unsatisfied() helper), letting clients correct an out-of-range request — RFC 9110 §15.5.17.
request_unsatisfiable_range was omitted — sits in the apache-gated range-test.c (never runs in %check without mod_ssl), and would require grafting partial upstream test code; dropping it keeps the diff minimal.

Files changed

image

Backport notes:

  • Minimal — no HAVE_APACHE restructuring;
  • range-test is apache-gated → not run in %check (no mod_ssl in chroot); server-mem-limit-test runs. Truncation fix validated via POC.
  • The new /ranges/content-range test from 6ece9e52 is self-contained (no Apache) and does run in %check, giving the CVE in-build coverage.

Verification

Patch Application:
image

Build and Test Results:
image (12)

POC Summary — CVE-2026-77014 (range-sort truncation)

Idea: Request two byte ranges whose 64-bit start-difference overflows the old 32-bit comparator, on a >2 GB resource. Buggy lib mis-sorts and drops a range.

Vulnerability reproduced on unpatched lib
image
count=1 → only 3000000000-3000000100 (the 0-100 range dropped)

Fix verified on patched lib
image
count=2 → 0-100 then 3000000000-3000000100, sorted

@v-aaditya

Aditya Singh (v-aaditya) commented Sep 4, 2026

Copy link
Copy Markdown

Buddy Build has been re-triggered and it has passed.

Peer-review analysis - LGTM.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants