Skip to content

[LOW] Patch expat for CVE-2026-41080 CVE-2026-45186#17553

Open
Ratiranjan5 wants to merge 3 commits into
microsoft:3.0-devfrom
Kanishk-Bansal:topic_expat-3.0-CVE-2026-45186
Open

[LOW] Patch expat for CVE-2026-41080 CVE-2026-45186#17553
Ratiranjan5 wants to merge 3 commits into
microsoft:3.0-devfrom
Kanishk-Bansal:topic_expat-3.0-CVE-2026-45186

Conversation

@Ratiranjan5
Copy link
Copy Markdown

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?
Patch expat for CVE-2026-41080 CVE-2026-45186
Patch modified: Yes

  • The expat package (version 2.6.4) is affected by CVE-2026-41080 and CVE-2026-45186, as the vulnerability impacts versions earlier than 2.8.0.
    CVE-2026-41080:
  • This issue is caused by insufficient entropy used for hash salt generation, which can allow hash-flooding attacks via crafted XML input leading to denial-of-service.
  • The upstream fix improves hash flooding protection by increasing entropy from 4–8 bytes to 16 bytes, leveraging full SipHash capabilities and enhancing randomness in hash salt generation.
  • The patch has been backported manually by applying only the required changes to source package (xmlparse.c, internal.h, and expat.h).
  • Non-essential upstream changes (documentation updates, test additions, CI-related files, and symbol export files) have been excluded as they are not required for the CVE fix. Example: doc/reference.html, data/exported-symbols-unversioned.txt, exported-symbols-versioned-default.txt, lib/libexpat.map.in, tests/basic_tests.c and Changes etc.
  • Replaced recursive parent parser delegation with using getRootParserOf() helper that fixes undeclared variable error and improves code consistency with upstream implementation.
  • As in upstream, added platform-specific guard to skip PID entropy in WASI environments.

CVE-2026-45186:

Change Log
  • new file: SPECS/expat/CVE-2026-41080.patch
  • modified: SPECS/expat/expat.spec
  • modified: toolkit/resources/manifests/package/pkggen_core_aarch64.txt
  • modified: toolkit/resources/manifests/package/pkggen_core_x86_64.txt
  • modified: toolkit/resources/manifests/package/toolchain_aarch64.txt
  • modified: toolkit/resources/manifests/package/toolchain_x86_64.txt
Does this affect the toolchain?

YES

Associated issues
  • #xxxx
Links to CVEs
Test Methodology
  • Local build was successful.
image
  • Patch applies cleanly.
image image
  • Installation:
image image
  • Uninstallation:
image

@microsoft-github-policy-service microsoft-github-policy-service Bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels May 29, 2026
@Ratiranjan5
Copy link
Copy Markdown
Author

@Ratiranjan5
Copy link
Copy Markdown
Author

@Ratiranjan5 Ratiranjan5 marked this pull request as ready for review May 29, 2026 11:29
@Ratiranjan5 Ratiranjan5 requested a review from a team as a code owner May 29, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0 Packaging security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants