Skip to content

[Medium] Patch packer for CVE-2026-45570 and CVE-2026-45571#17609

Open
v-aaditya wants to merge 5 commits into
microsoft:3.0-devfrom
Kanishk-Bansal:topic-CVE-Fix/packer/3.0/CVE-2026-45571
Open

[Medium] Patch packer for CVE-2026-45570 and CVE-2026-45571#17609
v-aaditya wants to merge 5 commits into
microsoft:3.0-devfrom
Kanishk-Bansal:topic-CVE-Fix/packer/3.0/CVE-2026-45571

Conversation

@v-aaditya

@v-aaditya v-aaditya commented Jun 3, 2026

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
  • Patch packer for CVE-2026-45571

    • The github.com/go-git/go-git/v5 vendor package has been upgraded from v5.13.0 => v5.19.1.
    • The github.com/go-git/go-billy/v5 vendor package has been upgraded from v5.6.0 => v5.9.0, which was needed for compilation of upgraded github.com/go-git/go-git/v5.
    • go.mod and vendor/module.txt files have modified to change the version of go module to 1.22, which was required for compilation of upgraded github.com/go-git/go-git/v5.
    • BuildRequires: golang >= 1.21 has been updated to 1.22.
    • Upstream Patch reference: https://github.com/go-git/go-git/releases/tag/v5.19.1
  • This patch also fixes CVE-2026-45570

Change Log
Does this affect the toolchain?

NO

Links to CVEs
Test Methodology
  • Local build was successful.
  • Patch applies cleanly
  • License check script shows no warning.
  • Installation and Uninstallation on docker image was successful.

@microsoft-github-policy-service microsoft-github-policy-service Bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Jun 3, 2026
@v-aaditya

v-aaditya commented Jun 3, 2026

Copy link
Copy Markdown
Author

Buddy Build has been triggered and it has passed.

@v-aaditya v-aaditya marked this pull request as ready for review June 3, 2026 05:37
@v-aaditya v-aaditya requested a review from a team as a code owner June 3, 2026 05:37

@mfrw mfrw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅ — clean vendor bump to go-git/v5 v5.19.1 + go-billy/v5 v5.9.0.

  • Spec hygiene clean: Release: 15→16, Patch34 ordered correctly, %changelog entry matches, BuildRequires: golang >= 1.21 → 1.22 aligned with the go.mod / vendor/modules.txt bump to go 1.22.
  • Vendor delta matches upstream v5.13.0..v5.19.1 (go-git) and v5.6.0..v5.9.0 (go-billy) — spot-checked the pathutil.ValidTreePath gate in worktree.doAddFileToIndex, the new worktreeFilesystem wrapper, and the SSH shell-quote fix.
  • Buddy build green on both arches: buildId=1131745.
  • PR checklist ticked, no failing PR checks.

CVE → upstream fix mapping (both land in v5.19.1):

CVE GHSA Severity Upstream PR
CVE-2026-45571 GHSA-crhj-59gh-8x96 Medium #2100 (worktreeFilesystem) + submodule hardening #2070 #2074 #2078 #2082
CVE-2026-45570 GHSA-m7cr-m3pv-hgrp Low #2068 (transport/ssh shell-quote)

Nit (non-blocking): patch file is named CVE-2026-45571.patch but it also carries the CVE-2026-45570 fix — might be worth a rename or a comment header in the patch noting both CVE IDs. Same for the PR title. Up to you, not blocking.

Signed-Off By: @mfrw

@v-aaditya

v-aaditya commented Jun 3, 2026

Copy link
Copy Markdown
Author

LGTM ✅ — clean vendor bump to go-git/v5 v5.19.1 + go-billy/v5 v5.9.0.

  • Spec hygiene clean: Release: 15→16, Patch34 ordered correctly, %changelog entry matches, BuildRequires: golang >= 1.21 → 1.22 aligned with the go.mod / vendor/modules.txt bump to go 1.22.
  • Vendor delta matches upstream v5.13.0..v5.19.1 (go-git) and v5.6.0..v5.9.0 (go-billy) — spot-checked the pathutil.ValidTreePath gate in worktree.doAddFileToIndex, the new worktreeFilesystem wrapper, and the SSH shell-quote fix.
  • Buddy build green on both arches: buildId=1131745.
  • PR checklist ticked, no failing PR checks.

CVE → upstream fix mapping (both land in v5.19.1):

CVE GHSA Severity Upstream PR
CVE-2026-45571 GHSA-crhj-59gh-8x96 Medium #2100 (worktreeFilesystem) + submodule hardening #2070 #2074 #2078 #2082
CVE-2026-45570 GHSA-m7cr-m3pv-hgrp Low #2068 (transport/ssh shell-quote)
Nit (non-blocking): patch file is named CVE-2026-45571.patch but it also carries the CVE-2026-45570 fix — might be worth a rename or a comment header in the patch noting both CVE IDs. Same for the PR title. Up to you, not blocking.

Signed-Off By: @mfrw

Updated Patch header and name to add info for CVE-2026-45570.
Re-triggered the Buddy Build and it has passed !
I have also updated the PR title.

@v-aaditya v-aaditya changed the title [Medium] Patch packer for CVE-2026-45571 [Medium] Patch packer for CVE-2026-45570 and CVE-2026-45571 Jun 3, 2026
@Kanishk-Bansal Kanishk-Bansal added the ready-for-stable-review PR has passed initial review and is now ready for a second-level stable maintainer review label Jun 4, 2026
@v-aaditya

v-aaditya commented Jun 8, 2026

Copy link
Copy Markdown
Author

Re-triggered Buddy Build and it has passed.

@kgodara912 kgodara912 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is too big to carry. Instead of doing package upgrade this way, ideally, we should upgrade vendor tarball itself. But before that, we should search for a patch availability, we need to search for the CVEs and see if any patch could address the core issue of vulnerability.

Comment thread SPECS/packer/packer.spec Outdated
Patch32: CVE-2026-46598.patch
Patch33: CVE-2026-33814.patch
Patch34: CVE-2026-39833.patch
Patch35: CVE-2026-45570-and-CVE-2026-45571.patch

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other files should go as no patch, so your CVE files should go as CVE-2026-45570.patch and CVE-2026-45571.nopatch, you need not to include nopatch file in spec itself.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated patch file name and added .nopatch file for CVE-2026-45570.

@v-aaditya

Copy link
Copy Markdown
Author

PR is too big to carry. Instead of doing package upgrade this way, ideally, we should upgrade vendor tarball itself. But before that, we should search for a patch availability, we need to search for the CVEs and see if any patch could address the core issue of vulnerability.

I am checking on this !

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 ready-for-stable-review PR has passed initial review and is now ready for a second-level stable maintainer review security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants