CVE-2025-40182: crypto: skcipher - Fix reqsize handling
In the Linux kernel, the following vulnerability has been resolved:
crypto: skcipher - Fix reqsize handling
Commit afddce13ce81d ("crypto: api - Add reqsize to cryptoalg") introduced crareqsize field in cryptoalg struct to replace type specific reqsize fields. It looks like this was introduced specifically for ahash and acomp from the commit description as subsequent commits add necessary changes in these alg frameworks.
However, this is being recommended for use in all crypto algs [1] instead of setting reqsize using cryptosetreqsize(). Using crareqsize in skcipher algorithms, hence, causes memory corruptions and crashes as the underlying functions in the algorithm framework have not been updated to set the reqsize properly from crareqsize. [2]
Add proper setreqsize calls in the skcipher init function to properly initialize reqsize for these algorithms in the framework.
[1]: https://lore.kernel.org/linux-crypto/aCL8BxpHr5OpT04k@gondor.apana.org.au/ [2]: https://gist.github.com/Pratham-T/24247446f1faf4b7843e4014d5089f6b
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-40182?
CVE-2025-40182 has been classified as a high severity vulnerability due to potential exploitation in crypto API handling.
How do I fix CVE-2025-40182?
To fix CVE-2025-40182, you should update to the latest stable version of the Linux kernel that includes the patch for this vulnerability.
What systems are affected by CVE-2025-40182?
CVE-2025-40182 affects the Linux kernel, specifically versions prior to the inclusion of the fix for reqsize handling in the crypto API.
What type of vulnerability is CVE-2025-40182?
CVE-2025-40182 is a cryptographic vulnerability related to improper handling of request sizes in the Linux kernel crypto API.
Is there a public exploit for CVE-2025-40182?
As of now, there is no known public exploit for CVE-2025-40182, but it is recommended to apply the patch promptly to mitigate risks.