Skip to content

[Medium] Patch libsoup for CVE-2025-32909, CVE-2025-32910, CVE-2025-32912, CVE-2025-4476 #13496

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

Merged

Conversation

kevin-b-lockwood
Copy link
Contributor

@kevin-b-lockwood kevin-b-lockwood commented Apr 18, 2025

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 (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/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
  • If you are adding/removing a .spec file that has multiple-versions supported, please add @microsoft/cbl-mariner-multi-package-reviewers team as reviewer (Eg. golang has 2 versions 1.18, 1.21+)
  • Ready to merge

Summary

Patch libsoup for CVE-2025-32909, CVE-2025-32910, CVE-2025-32912

Change Log
Does this affect the toolchain?

NO

Links to CVEs
Test Methodology
  • Local build

@kevin-b-lockwood kevin-b-lockwood requested review from a team as code owners April 18, 2025 23:11
@microsoft-github-policy-service microsoft-github-policy-service bot added Packaging specs-extended PR to fix SPECS-EXTENDED documentation Improvements or additions to documentation Tools Schema Changes to image configurations 3.0 PRs Destined for 3.0 labels Apr 18, 2025
Copy link
Contributor

@Kanishk-Bansal Kanishk-Bansal left a comment

Choose a reason for hiding this comment

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

Kindly retarget this PR against the dev branch. For 3.0 it's 3.0-dev and for 2.0 it is main

@kevin-b-lockwood kevin-b-lockwood changed the base branch from 3.0 to fasttrack/2.0 April 21, 2025 16:03
@kevin-b-lockwood kevin-b-lockwood changed the base branch from fasttrack/2.0 to main April 21, 2025 16:03
@microsoft-github-policy-service microsoft-github-policy-service bot added the main PR Destined for main label Apr 21, 2025
@kevin-b-lockwood
Copy link
Contributor Author

Kindly retarget this PR against the dev branch. For 3.0 it's 3.0-dev and for 2.0 it is main

My apologies, must have been bad muscle memory I think. Ought to be all straightened out now.

@kevin-b-lockwood
Copy link
Contributor Author

Fixed merge conflicts and numbered the patches as per #13446 (comment)

@Kanishk-Bansal Kanishk-Bansal added security and removed 3.0 PRs Destined for 3.0 documentation Improvements or additions to documentation Schema Changes to image configurations specs-extended PR to fix SPECS-EXTENDED Tools labels Apr 22, 2025
* Fri Apr 25 2025 Kshitiz Godara <kgodara@microsoft.com> - 3.0.4-4
- Add patch for CVE-2025-32914


Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do

Copy link
Contributor

@Kanishk-Bansal Kanishk-Bansal left a comment

Choose a reason for hiding this comment

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

  • Buddy Build
  • patch applied during the build (check rpm.log)
  • patch include an upstream reference
  • PR has security tag

@@ -129,9 +135,15 @@ find %{buildroot} -type f -name "*.la" -delete -print
%defattr(-,root,root)

%changelog
* Fri Apr 28 2025 Kevin Lockwood <v-klockwood@microsoft.com> - 3.0.4-4
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please update release number, here and above release tag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Forgot to bump the release number during the merge, I'll fix that now.

Copy link
Contributor Author

@kevin-b-lockwood kevin-b-lockwood left a comment

Choose a reason for hiding this comment

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

Hopefully addressed all the concerns

@@ -129,9 +135,15 @@ find %{buildroot} -type f -name "*.la" -delete -print
%defattr(-,root,root)

%changelog
* Fri Apr 28 2025 Kevin Lockwood <v-klockwood@microsoft.com> - 3.0.4-4
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Forgot to bump the release number during the merge, I'll fix that now.

* Fri Apr 25 2025 Kshitiz Godara <kgodara@microsoft.com> - 3.0.4-4
- Add patch for CVE-2025-32914


Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do

Copy link
Contributor

@kgodara912 kgodara912 left a comment

Choose a reason for hiding this comment

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

Sorry to bother you again, actually for CVE-2025-32912, there are 3 patches from the issue request,
Fix: !417 (merged) and !434 (merged) and 910ebdcd

Out of three patches, you only took one which was also later modified as from
if (!soup_auth_get_realm (auth) || !g_hash_table_contains (auth_params, "nonce")) to
if (!soup_auth_get_realm (auth) || !g_hash_table_lookup (auth_params, "nonce"))

Please check all the relevant fixes for CVEs from above fix list of the issue https://gitlab.gnome.org/GNOME/libsoup/-/issues/434 and confirm once if this is the one only needed to fix the CVE. Remaining two look ok.

@kgodara912
Copy link
Contributor

Buddy build. After rebase to tip, the patches in this PR don't apply cleanly. Please ensure that patches apply cleanly after rebasing.

@Kanishk-Bansal Kanishk-Bansal self-requested a review May 15, 2025 16:26
@Kanishk-Bansal
Copy link
Contributor

@kevin-b-lockwood
Investigate.

@kevin-b-lockwood kevin-b-lockwood marked this pull request as draft May 15, 2025 23:10
@kevin-b-lockwood
Copy link
Contributor Author

Sorry to bother you again, actually for CVE-2025-32912, there are 3 patches from the issue request, Fix: !417 (merged) and !434 (merged) and 910ebdcd

Out of three patches, you only took one which was also later modified as from if (!soup_auth_get_realm (auth) || !g_hash_table_contains (auth_params, "nonce")) to if (!soup_auth_get_realm (auth) || !g_hash_table_lookup (auth_params, "nonce"))

Please check all the relevant fixes for CVEs from above fix list of the issue https://gitlab.gnome.org/GNOME/libsoup/-/issues/434 and confirm once if this is the one only needed to fix the CVE. Remaining two look ok.

Of the three patchsets mentioned:

  • !417 (merged): These are the patches contained in CVE-2025-32910.patch. Prerequisite for CVE-2025-32912, but also the patches for that CVE.
  • !434 (merged): This is the patch already in CVE-2025-32912.patch.
  • 910ebdcd: I had not seen this patch, thank you for bringing it to my attention. I have added it.

@kevin-b-lockwood kevin-b-lockwood marked this pull request as ready for review May 16, 2025 00:27
@Kanishk-Bansal Kanishk-Bansal marked this pull request as draft May 21, 2025 04:44
@kevin-b-lockwood kevin-b-lockwood changed the title [Medium] Patch libsoup for CVE-2025-32909, CVE-2025-32910, CVE-2025-32912 [Medium] Patch libsoup for CVE-2025-32909, CVE-2025-32910, CVE-2025-32912, CVE-2025-4476 May 21, 2025
@kevin-b-lockwood kevin-b-lockwood marked this pull request as ready for review May 21, 2025 22:06
Copy link
Contributor

@Kanishk-Bansal Kanishk-Bansal left a comment

Choose a reason for hiding this comment

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

since you have modified either create a new patch or try to apply the upstream patches with no changes

@kevin-b-lockwood
Copy link
Contributor Author

kevin-b-lockwood commented May 22, 2025

since you have modified either create a new patch or try to apply the upstream patches with no changes

I didn't make any changes to the patch for CVE-2025-4476, I downloaded the patch, renamed the patch file, and added it to the spec file.

Copy link
Contributor

@kgodara912 kgodara912 left a comment

Choose a reason for hiding this comment

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

Test cases aren't included as part of two CVE patches. Any reason for excluding them from patches? Buddy build

@kevin-b-lockwood
Copy link
Contributor Author

Test cases aren't included as part of two CVE patches. Any reason for excluding them from patches? Buddy build

I didn't exclude them, the source patches simply didn't include any updates to the tests that I could find. I just went through and compared the patches in the PR and the patches in the upstream and I didn't see any where I had removed any tests. Please tell me which patches if I missed any.

@kevin-b-lockwood
Copy link
Contributor Author

@kgodara912 Please clarify which tests are missing so I can get this PR moving again

Copy link
Contributor

@kgodara912 kgodara912 left a comment

Choose a reason for hiding this comment

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

Buddy build is succeeded. LGTM.

Copy link
Contributor

@Kanishk-Bansal Kanishk-Bansal left a comment

Choose a reason for hiding this comment

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

@0xba1a 0xba1a merged commit 455fe9b into microsoft:main Jun 12, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
main PR Destined for main Packaging security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants