CVE-2025-40182
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
12/11/2025
Last modified:
12/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
crypto: skcipher - Fix reqsize handling<br />
<br />
Commit afddce13ce81d ("crypto: api - Add reqsize to crypto_alg")<br />
introduced cra_reqsize field in crypto_alg struct to replace type<br />
specific reqsize fields. It looks like this was introduced specifically<br />
for ahash and acomp from the commit description as subsequent commits<br />
add necessary changes in these alg frameworks.<br />
<br />
However, this is being recommended for use in all crypto algs [1]<br />
instead of setting reqsize using crypto_*_set_reqsize(). Using<br />
cra_reqsize in skcipher algorithms, hence, causes memory<br />
corruptions and crashes as the underlying functions in the algorithm<br />
framework have not been updated to set the reqsize properly from<br />
cra_reqsize. [2]<br />
<br />
Add proper set_reqsize calls in the skcipher init function to<br />
properly initialize reqsize for these algorithms in the framework.<br />
<br />
[1]: https://lore.kernel.org/linux-crypto/aCL8BxpHr5OpT04k@gondor.apana.org.au/<br />
[2]: https://gist.github.com/Pratham-T/24247446f1faf4b7843e4014d5089f6b



