Bug 1220210 (CVE-2024-26130) - VUL-0: CVE-2024-26130: python-cryptography: NULL pointer dereference in pkcs12.serialize_key_and_certificates()
Summary: VUL-0: CVE-2024-26130: python-cryptography: NULL pointer dereference in pkcs...
Status: RESOLVED FIXED
Alias: CVE-2024-26130
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/394761/
Whiteboard: CVSSv3.1:SUSE:CVE-2024-26130:6.2:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-22 14:02 UTC by SMASH SMASH
Modified: 2024-06-24 13:49 UTC (History)
3 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SMASH SMASH 2024-02-22 14:02:54 UTC
cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Starting in version 38.0.0 and prior to version 42.0.4, if `pkcs12.serialize_key_and_certificates` is called with both a certificate whose public key did not match the provided private key and an `encryption_algorithm` with `hmac_hash` set (via `PrivateFormat.PKCS12.encryption_builder().hmac_hash(...)`, then a NULL pointer dereference would occur, crashing the Python process. This has been resolved in version 42.0.4, the first version in which a `ValueError` is properly raised.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2024-26130
https://www.cve.org/CVERecord?id=CVE-2024-26130
https://github.com/pyca/cryptography/pull/10423
https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4

Patch:
https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55
Comment 1 Andrea Mattiazzo 2024-02-22 14:03:35 UTC
Tracking as affected:
 - SUSE:ALP:Source:Standard:1.0/python-cryptography
 - SUSE:SLE-15-SP4:Update/python-cryptography
 - openSUSE:Factory/python-cryptography
Comment 2 OBSbugzilla Bot 2024-02-22 18:45:03 UTC
This is an autogenerated message for OBS integration:
This bug (1220210) was mentioned in
https://build.opensuse.org/request/show/1149625 Factory / python-cryptography
Comment 6 Maintenance Automation 2024-03-05 16:30:14 UTC
SUSE-SU-2024:0763-1: An update that solves one vulnerability can now be installed.

Category: security (moderate)
Bug References: 1220210
CVE References: CVE-2024-26130
Sources used:
openSUSE Leap 15.4 (src): python-cryptography-test-41.0.3-150400.16.15.1, python-cryptography-41.0.3-150400.16.15.1
openSUSE Leap 15.5 (src): python-cryptography-41.0.3-150400.16.15.1
Python 3 Module 15-SP5 (src): python-cryptography-41.0.3-150400.16.15.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 10 Maintenance Automation 2024-06-21 12:30:32 UTC
SUSE-SU-2024:2138-1: An update that solves one vulnerability can now be installed.

Category: security (moderate)
Bug References: 1220210
CVE References: CVE-2024-26130
Maintenance Incident: [SUSE:Maintenance:34437](https://smelt.suse.de/incident/34437/)
Sources used:
openSUSE Leap 15.6 (src):
 python-cryptography-test-41.0.3-150600.23.3.2, python-cryptography-41.0.3-150600.23.3.1
Python 3 Module 15-SP6 (src):
 python-cryptography-41.0.3-150600.23.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 11 Andrea Mattiazzo 2024-06-24 13:49:51 UTC
All done, closing.