Skip to content

[AutoPR- Security] Patch rust-afterburn for CVE-2026-25541 [MEDIUM]#16943

Draft
azurelinux-security wants to merge 3 commits intomicrosoft:3.0-devfrom
azurelinux-security:azure-autosec/rust-afterburn/3.0/1105585
Draft

[AutoPR- Security] Patch rust-afterburn for CVE-2026-25541 [MEDIUM]#16943
azurelinux-security wants to merge 3 commits intomicrosoft:3.0-devfrom
azurelinux-security:azure-autosec/rust-afterburn/3.0/1105585

Conversation

@azurelinux-security
Copy link
Copy Markdown
Contributor

@azurelinux-security azurelinux-security commented Apr 29, 2026

Auto Patch rust-afterburn for CVE-2026-25541.

Autosec pipeline run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=1105585&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

@microsoft-github-policy-service microsoft-github-policy-service Bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Apr 29, 2026
@AkarshHCL
Copy link
Copy Markdown
Contributor

We added Patch4 because Cargo’s vendored source mechanism includes an integrity file:
vendor/bytes/.cargo-checksum.json
This file records a SHA256 for every file in that vendored crate (e.g. ci/miri.sh, src/bytes_mut.rs, tests/test_bytes.rs). When we apply a CVE fix directly to vendored sources, the contents of those files change, so the recorded hashes in .cargo-checksum.json become wrong.
During the build, Cargo validates those hashes and fails with an error like “checksum has changed” unless the checksum file is updated.
So Patch4 exists solely to:
update the entries in vendor/bytes/.cargo-checksum.json to match the patched file contents, and
allow cargo --offline/vendored builds to proceed reproducibly.

If we apply Patch3 before untaring %{SOURCE1}, RPM/patch would fail with “file not found” because there would be no vendor/bytes/... files to patch.

So the ordering is:

Unpack upstream afterburn sources (Source0)
Apply patches that target the upstream tree (Patch0–Patch2)
Extract vendor tarball (Source1) → now vendor/bytes/... exists
Apply Patch3 to vendor/bytes/...
Apply Patch4 to update vendor/bytes/.cargo-checksum.json
That ordering ensures both the vendored content and Cargo’s checksum metadata are consistent.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants