cryptography NULL pointer dereference with pkcs12.serialize_key_and_certificates when called with a non-matching certificate and private key and an hmac_hash override
Description
Published by the National Vulnerability Database
Feb 21, 2024
Published to the GitHub Advisory Database
Feb 21, 2024
Reviewed
Feb 21, 2024
Last updated
Feb 6, 2025
If
pkcs12.serialize_key_and_certificatesis called with both:encryption_algorithmwithhmac_hashset (viaPrivateFormat.PKCS12.encryption_builder().hmac_hash(...)Then a NULL pointer dereference would occur, crashing the Python process.
This has been resolved, and now a
ValueErroris properly raised.Patched in pyca/cryptography#10423
References