CVE-2022-50731
Unknown Unknown - Not Provided
Null Pointer Dereference in Linux Kernel akcipher Private Key Handling

Publication date: 2025-12-24

Last updated on: 2025-12-24

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: crypto: akcipher - default implementation for setting a private key Changes from v1: * removed the default implementation from set_pub_key: it is assumed that an implementation must always have this callback defined as there are no use case for an algorithm, which doesn't need a public key Many akcipher implementations (like ECDSA) support only signature verifications, so they don't have all callbacks defined. Commit 78a0324f4a53 ("crypto: akcipher - default implementations for request callbacks") introduced default callbacks for sign/verify operations, which just return an error code. However, these are not enough, because before calling sign the caller would likely call set_priv_key first on the instantiated transform (as the in-kernel testmgr does). This function does not have a default stub, so the kernel crashes, when trying to set a private key on an akcipher, which doesn't support signature generation. I've noticed this, when trying to add a KAT vector for ECDSA signature to the testmgr. With this patch the testmgr returns an error in dmesg (as it should) instead of crashing the kernel NULL ptr dereference.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-12-24
Last Modified
2025-12-24
Generated
2026-05-07
AI Q&A
2025-12-24
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability occurs in the Linux kernel's crypto subsystem, specifically in the akcipher module's default implementation for setting a private key. Some akcipher algorithms, like ECDSA, only support signature verification and do not implement all required callbacks, including set_priv_key. When the kernel tries to set a private key on such an akcipher transform that lacks this callback, it results in a kernel crash due to a NULL pointer dereference. The patch fixes this by removing the default implementation from set_pub_key and ensuring that an error is returned instead of crashing when set_priv_key is called on unsupported algorithms.


How can this vulnerability impact me? :

This vulnerability can cause the Linux kernel to crash when attempting to set a private key on certain akcipher algorithms that do not support signature generation. This can lead to system instability or denial of service, as the kernel encounters a NULL pointer dereference and crashes instead of handling the error gracefully.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart