CVE Database›Document archive›CVE-2025-40182

CVE-2025-40182

kernel: crypto: skcipher - Fix reqsize handling

Loading…

Severity

Moderate

Red Hat Product Security

5.5

CVSS 3.1

Review impact separately from score.

Published · November 12, 2025

Updated · October 30, 2026

Description

In the Linux kernel, the following vulnerability has been resolved:

crypto: skcipher - Fix reqsize handling

Commit afddce13ce81d ("crypto: api - Add reqsize to crypto_alg") introduced cra_reqsize field in crypto_alg 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 crypto_*_set_reqsize(). Using cra_reqsize 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 cra_reqsize. 2 ↗

Add proper set_reqsize calls in the skcipher init function to properly initialize reqsize for these algorithms in the framework.

Statement

This vulnerability is evaluated with a Moderate severity rating because an unprivileged local user could potentially trigger kernel memory corruption and cause a system crash, resulting in a denial of service without compromising confidentiality or integrity. Supported Red Hat Enterprise Linux releases are not vulnerable as the code changes that introduced this flaw upstream are not present in our kernel builds.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

CWE-131 · Incorrect Calculation of Buffer Size