Skip to content

[Medium] Patch shim-unsigned-x64 for CVE-2024-9143 #13946

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 1 commit into
base: 3.0-dev
Choose a base branch
from

Conversation

v-smalavathu
Copy link
Contributor

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

shim-unsigned-x64: Patch for CVE-2024-9143

Change Log
  • new file: SPECS/shim-unsigned-x64/CVE-2024-9143.patch
  • modified: SPECS/shim-unsigned-x64/shim-unsigned-x64.spec
  • modified: SPECS/shim-unsigned-aarch64/shim-unsigned-aarch64.spec
  • modified: SPECS/shim/shim.spec
Does this affect the toolchain?

NO

Associated issues
  • #xxxx
Links to CVEs
Test Methodology
  • Pipeline build id: xxxx

Signed-off-by: Sreenivasulu Malavathula <v-smalavathu@microsoft.com>
@v-smalavathu v-smalavathu requested a review from a team as a code owner June 3, 2025 02:07
@microsoft-github-policy-service microsoft-github-policy-service bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Jun 3, 2025
@kgodara912
Copy link
Contributor

Check the #13962 and see if requested changes are applicable here as well.

@v-smalavathu
Copy link
Contributor Author

v-smalavathu commented Jun 9, 2025

Check the #13962 and see if requested changes are applicable here as well.

Yes, I updated as per PR #13962 details here too.
Let me know are you expecting other than this.
-Thanks

@v-smalavathu
Copy link
Contributor Author

v-smalavathu commented Jun 10, 2025

@kgodara912,
Here, the Patch summary

  1. The affected files need to change for this CVE from Astrolab as shown below snapshot.
    image

  2. As shown from "Upstream Reference Patch", the file test/ec_internal_test.c is not part of affected file in 'Astrolab' snapshot as shown above and this file is not available in our version,

Kindly let me know if I need to add something here.
-Thanks

@Kanishk-Bansal Kanishk-Bansal requested a review from a team June 13, 2025 09:25
@microsoft microsoft deleted a comment from v-smalavathu Jun 25, 2025
@Kanishk-Bansal
Copy link
Contributor

Buddy Build

@akhila-guruju
Copy link
Contributor

akhila-guruju commented Jul 8, 2025

@kgodara912, Here, the Patch summary

  1. The affected files need to change for this CVE from Astrolab as shown below snapshot.
    image
  2. As shown from "Upstream Reference Patch", the file test/ec_internal_test.c is not part of affected file in 'Astrolab' snapshot as shown above and this file is not available in our version,

Kindly let me know if I need to add something here. -Thanks

Another information to be noted:
Instead of the line # include <openssl/ec.h> in upstream patch, the macro OPENSSL_ECC_MAX_FIELD_BITS is directly defined (taken from openssl/ec.h which is present in source tarball) in the created patch.

@Malateshk007 Malateshk007 requested a review from kgodara912 July 8, 2025 13:28
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.

As such patch is matching with upstream reference and is applied during build. The macro is taken directly from ec.h though it may change in future but for the current use case, it should be good enough. Package is building and installing fine. We need to get signoff from bootloader team as well.

#include "bn_lcl.h"

+# ifndef OPENSSL_ECC_MAX_FIELD_BITS
+# define OPENSSL_ECC_MAX_FIELD_BITS 661
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

4 participants