azurelinux icon indicating copy to clipboard operation
azurelinux copied to clipboard

[LOW] Patch gnupg2 for CVE-2025-30258

Open Ratiranjan5 opened this issue 1 month ago • 1 comments

Merge Checklist

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

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

Summary

Patch gnupg2 for CVE-2025-30258 Patch modified: Yes

  • Upstream patch is applied manually as hunk failed. i. Upstream uses get_pubkey_byfpr() and check_signature(), while our code base uses get_pubkey_byfprint() and check_signature2() respectively. ii. check_signature2() now has 11 parameters (the last one is kbnode_t *r_keyblock introduced by upstream changes). Adding an extra NULL ensures proper alignment with the function definition and prevents compilation errors.
    iii. Adjustments were made to align with our existing function names and argument structure.

Upstream Patch reference: https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=48978ccb4e20866472ef18436a32744350a65158

Change Log
  • new file: SPECS/gnupg2/CVE-2025-30258.patch
  • modified: SPECS/gnupg2/gnupg2.spec
Does this affect the toolchain?

YES

Associated issues
  • #xxxx
Links to CVEs
  • https://nvd.nist.gov/vuln/detail/CVE-2025-30258
Test Methodology
  • Local build was successful. Failed SRPMs tests not due to regression from the created patch. Screenshot 2025-11-07 143748

gnupg2-2.4.0-2.cm2.src.rpm.log

-Patch applies cleanly. gnupg2-2 0-CVE-2025-30258

-Check Installation image

-Check Uninstallation image

Ratiranjan5 avatar Nov 07 '25 11:11 Ratiranjan5