Skip to content
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

Add a patch to fix CVE-2023-49083 #6955

Conversation

aadhar-agarwal
Copy link
Contributor

@aadhar-agarwal aadhar-agarwal commented Dec 8, 2023

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
  • Ready to merge

Summary

What does the PR accomplish, why was it needed?

  • This PR adds a patch to fix CVE-2023-49083
  • Calling load_pem_pkcs7_certificates or load_der_pkcs7_certificates could lead to a NULL-pointer dereference and segfault. Exploitation of this vulnerability poses a serious risk of Denial of Service (DoS) for any application attempting to deserialize a PKCS7 blob/certificate.
Change Log
  • This is the upstream PR in pyca/cryptography that fixes the issue
  • There was a comment (regarding raising an exception) that was addressed later on in this PR
  • The patch has the changes from both of these PRs
Does this affect the toolchain?

NO

Associated issues
Links to CVEs
Test Methodology
  • Buddy Build - Pass

  • In the GitHub advisory, there is a reproducer for this issue. Used this reproducer to test the patch. Results are below.

  • Using python3-cryptography-3.3.2-5, we see the seg fault:
    image

  • Using the updated python3-cryptography-3.3.2-6, we see the ValueError exception being thrown:
    image

@aadhar-agarwal aadhar-agarwal marked this pull request as ready for review December 8, 2023 22:03
@aadhar-agarwal aadhar-agarwal requested a review from a team as a code owner December 8, 2023 22:03
Copy link
Member

@mfrw mfrw left a comment

Choose a reason for hiding this comment

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

LGTM

SPECS/python-cryptography/python-cryptography.spec Outdated Show resolved Hide resolved
@mfrw mfrw added the security label Dec 11, 2023
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/CVE-2023-49083 branch 3 times, most recently from 08abe7b to d9cc2c7 Compare December 14, 2023 22:59
@aadhar-agarwal aadhar-agarwal force-pushed the aadagarwal/CVE-2023-49083 branch from d9cc2c7 to e329637 Compare December 15, 2023 04:14
@PawelWMS
Copy link
Contributor

Closing. It looks like this has been now patched with #7135.

@PawelWMS PawelWMS closed this Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants