Skip to content

[MEDIUM] Patch glib for CVE-2025-4373 and CVE-2025-6052 #13974

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

Open
wants to merge 4 commits into
base: 3.0-dev
Choose a base branch
from

Conversation

aninda-al
Copy link
Contributor

@aninda-al aninda-al commented Jun 9, 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 (./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

Address CVE-2025-4373 and CVE-2025-6052

CVE-2025-4373:
Patch Modified: No
Upstream Patch reference: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4588.patch
Patch link found in Astrolabe

CVE-2025-6052:
Patch Modified: No
Upstream Patch Applies cleanly: https://gitlab.gnome.org/GNOME/glib/-/commit/37eecaa7efc48a0df22277444ff25ff791ac0ac1
Patch link found in Astrolabe

Change Log
  • modified: ../SPECS/glib/glib.spec
  • modified: resources/manifests/package/pkggen_core_aarch64.txt
  • modified: resources/manifests/package/pkggen_core_x86_64.txt
  • modified: resources/manifests/package/toolchain_aarch64.txt
  • modified: resources/manifests/package/toolchain_x86_64.txt
  • added: ../SPECS/glib/CVE-2025-4373.patch
  • added: ../SPECS/glib/CVE-2025-6052.patch
Does this affect the toolchain?

YES

Associated issues
  • #NA
Links to CVEs
Test Methodology
  • local build
  • Needs toolchain rebuild as glib is part of toolchain
  • Also checked local build log file to ensure patch applied cleanly.
    image

@microsoft-github-policy-service microsoft-github-policy-service bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Jun 9, 2025
@aninda-al aninda-al marked this pull request as ready for review June 9, 2025 23:15
@aninda-al aninda-al requested a review from a team as a code owner June 9, 2025 23:15
@aninda-al aninda-al closed this Jun 10, 2025
@aninda-al aninda-al reopened this Jun 10, 2025
@aninda-al aninda-al force-pushed the v-anipradhan/glib/CVE-2025-4373-3.0 branch from 5e8c992 to bd96f7c Compare June 11, 2025 10:54
@cyberbandya007
Copy link
Contributor

@cyberbandya007
Copy link
Contributor

@cyberbandya007
Copy link
Contributor

cyberbandya007 commented Jun 16, 2025

Buddy Build Successful.
Patch is applied in the rpmbuild logs.
Changes LGTM.

@aninda-al
Copy link
Contributor Author

@aninda-al , buddy build showing license issues - https://dev.azure.com/mariner-org/mariner/_build/results?buildId=834112&view=logs&j=bac295d9-f2e0-5165-e63e-e76f383e1a27&t=2e9390e1-fa16-5310-443b-65696d0c38df&l=70

Can you check and fix them?

I believe the license check warning for glib has always been there( i.e., its not newly introduced) and also appears to be a false +ive case. The file its complaining about is indeed a license file and is being copied using %license tag.

@cyberbandya007
Copy link
Contributor

cyberbandya007 commented Jun 17, 2025

@aninda-al , buddy build showing license issues - https://dev.azure.com/mariner-org/mariner/_build/results?buildId=834112&view=logs&j=bac295d9-f2e0-5165-e63e-e76f383e1a27&t=2e9390e1-fa16-5310-443b-65696d0c38df&l=70
Can you check and fix them?

I believe the license check warning for glib has always been there( i.e., its not newly introduced) and also appears to be a false +ive case. The file its complaining about is indeed a license file and is being copied using %license tag.

I don't think its false positive. After going through the error -

WARN: (glib-devel-2.78.6-3.azl3.x86_64.rpm) has license warnings:
bad general file:
/usr/share/licenses/glib/COPYING

The package glib-devel have license file which is not tagged.
You need to add following line (+) in files section for devel package at shown location.

%files devel
%defattr(-, root, root)
"+ %license COPYING"

Can you try local build with this change once? We will try buddy build after that.

@aninda-al
Copy link
Contributor Author

@aninda-al , buddy build showing license issues - https://dev.azure.com/mariner-org/mariner/_build/results?buildId=834112&view=logs&j=bac295d9-f2e0-5165-e63e-e76f383e1a27&t=2e9390e1-fa16-5310-443b-65696d0c38df&l=70
Can you check and fix them?

I believe the license check warning for glib has always been there( i.e., its not newly introduced) and also appears to be a false +ive case. The file its complaining about is indeed a license file and is being copied using %license tag.

I don't think its false positive. After going through the error -

WARN: (glib-devel-2.78.6-3.azl3.x86_64.rpm) has license warnings: bad general file: /usr/share/licenses/glib/COPYING

The package glib-devel have license file which is not tagged. You need to add following line (+) in files section for devel package at shown location.

%files devel %defattr(-, root, root) "+ %license COPYING"

Can you try local build with this change once? We will try buddy build after that.

@cyberbandya007 I did build with the changes you suggested, there was no build issue, so pushed the changes

@aninda-al aninda-al requested a review from cyberbandya007 June 18, 2025 01:06
@aninda-al aninda-al force-pushed the v-anipradhan/glib/CVE-2025-4373-3.0 branch from 886a111 to 068f702 Compare June 19, 2025 14:12
@cyberbandya007
Copy link
Contributor

@aninda-al
Copy link
Contributor Author

https://dev.azure.com/mariner-org/mariner/_build/results?buildId=842529&view=logs&j=bac295d9-f2e0-5165-e63e-e76f383e1a27&t=2e9390e1-fa16-5310-443b-65696d0c38df - Still have license warnings

@cyberbandya007 The follwing files by the name COPYING are present in the source tarball
image
and the warning
image
is for the root file which is a GPU license file.
Please let me know if you want me to try any other changes. Also, shall I keep the change you suggested earlier or get rid of it? Thanks!

@aninda-al aninda-al changed the title [MEDIUM] Patch glib for CVE-2025-4373 [MEDIUM] Patch glib for CVE-2025-4373 and CVE-2025-6052 Jun 23, 2025
@cyberbandya007
Copy link
Contributor

cyberbandya007 commented Jun 24, 2025

Buddy Build After recent changes - https://dev.azure.com/mariner-org/mariner/_build/results?buildId=846636&view=results

@aninda-al You can fix license check in following ways -

  1. Removing other license files which are not related to the package rpm and keeping and picking up the related license file in each rpm "files" section
  2. Adding exception if it can't be fixed if we have to keep all the duplicate license files

And for my suggested changes, my suggestion was based on the option 1 above to pick the license files in the devel package section. You might need to keep it to solve the problem.

@aninda-al
Copy link
Contributor Author

Buddy Build After recent changes - https://dev.azure.com/mariner-org/mariner/_build/results?buildId=846636&view=results

@aninda-al You can fix license check in following ways -

  1. Removing other license files which are not related to the package rpm and keeping and picking up the related license file in each rpm "files" section
  2. Adding exception if it can't be fixed if we have to keep all the duplicate license files

And for my suggested changes, my suggestion was based on the option 1 above to pick the license files in the devel package section. You might need to keep it to solve the problem.

I found that the COPYING file was actually just a link to LICENSES/LGPL-2.1-or-later.txt, made changes accordingly. Hope it will work this time

@aninda-al aninda-al requested a review from cyberbandya007 June 25, 2025 03:01
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 security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants