-
Notifications
You must be signed in to change notification settings - Fork 603
[LOW] Patch gnupg2 for CVE-2025-30258 #15048
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.0-dev
Are you sure you want to change the base?
Conversation
suresh-thelkar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you also need to take the following commit and backport it which makes the fix complete for the CVE and handles edge cases as well. Here is the upstream patch
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blobdiff;f=g10/getkey.c;h=e93c0a90449c667435fb8deb2b87d678f669327e;hp=21f996a5b3ef8c726516104986295bcc78d56afc;hb=d3d7713c1799754160260cb350309dd183b397f5;hpb=25d48663f9ed4b21b24b89abed71201ef0604657
suresh-thelkar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have verified the backporting changes -
- Upstream before patch: single function check_signature handling full signature verification.
- Azure baseline: wrapper int check_signature(ctrl, PKT_signature*, gcry_md_hd_t) calling core gpg_error_t check_signature2(..., extrahash, forced_pk, r_expiredate, r_expired, r_revoked, r_pk). Upstream patch adds kbnode_t *r_keyblock to the end of parameter list; azure adds it to check_signature2 (core) and adjusts wrapper to pass NULL.
The azure patch fully incorporates upstream’s new r_keyblock flow by adapting the core verification function (check_signature2) instead of upstream’s monolithic check_signature, with correct propagation, cleanup, and re-verification logic. No upstream functional changes related to the DoS fix are absent.
As this is toolchain pkg, please make sure to run the full build and verify all the ptests.
|
@Ratiranjan5 @Kanishk-Bansal as mentioned by Suresh, can we run full-build once? |
|
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
Patch gnupg2 for CVE-2025-30258
Patch modified: Yes
Upstream patch is applied manually as hunk failed.
i. Upstream uses
get_pubkey_byfpr()andcheck_signature(), while our code base usesget_pubkey_byfprint()andcheck_signature2()respectively.ii.
check_signature2()now has 11 parameters (the last one iskbnode_t *r_keyblockintroduced by upstreamchanges). 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.
Excluded the
NEWSfile from the upstream patch because it references version 2.5.5, while our package is based ongnupg-2.4.7.
Upstream Patch reference:
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=48978ccb4e20866472ef18436a32744350a65158
Change Log
Does this affect the toolchain?
YES
Associated issues
Links to CVEs
Test Methodology
Build Log:
gnupg2-2.4.7-2.azl3.src.rpm.log
Check Installation