CVE-2025-40019
Description
In the Linux kernel, the following vulnerability has been resolved:
crypto: essiv - Check ssize for decryption and in-place encryption
Move the ssize check to the start in essiv_aead_crypt so that it's also checked for decryption and in-place encryption.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A missing check for source buffer size in the essiv crypto driver could cause decryption and in-place encryption to read out of bounds.
Vulnerability
CVE-2025-40019 is a flaw in the Linux kernel's ESSIV (Encrypted Salt-Sector Initialization Vector) crypto driver. The essiv_aead_crypt function had a missing size check (ssize was verified for normal (non-in-place) encryption, but not for decryption or in-place encryption operations. This oversight means that when these code paths are executed, the kernel may try to read from or write to a memory region based on a source buffer size that has not been validated, leading to a potential out-of-bounds read.
Exploitation
To exploit this, an attacker would need the ability to submit AF_ALG requests (or otherwise interact with the kernel crypto subsystem) with carefully crafted struct aead_request parameters that trigger the vulnerable code path — specifically, a decryption request or an in-place encryption request where the source buffer length differs from the destination buffer length. No special privileges beyond access to the crypto device node are required, making it accessible to unprivileged users in many configurations.
Impact
If triggered, the out-of-bounds read could disclose sensitive kernel memory contents to the attacker, bypassing kernel ASLR or leaking key material. There is also a possibility of a kernel crash (denial of service) if the read accesses unmapped memory. The fix ensures that the size check is performed early in essiv_aead_crypt, covering all four combinations of encryption/decryption and in-place/out-of-place operations.
Mitigation
The issue was fixed in the Linux kernel commits that moved the ssize check to the very start of essiv_aead_crypt [1][2][3][4]. Users should update their kernel to a version that includes one of these commits. No workaround is known other than applying the patch.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
829294dd6f1e771f03f8f72d9df58651968f8248ff2797ff5f37e7860dc5edc4c854a5e74da7afb01ba056bb73db6948cVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- git.kernel.org/stable/c/248ff2797ff52a8cbf86507f9583437443bf7685nvd
- git.kernel.org/stable/c/29294dd6f1e7acf527255fb136ffde6602c3a129nvd
- git.kernel.org/stable/c/6bb73db6948c2de23e407fe1b7ef94bf02b7529fnvd
- git.kernel.org/stable/c/71f03f8f72d9c70ffba76980e78b38c180e61589nvd
- git.kernel.org/stable/c/da7afb01ba05577ba3629f7f4824205550644986nvd
- git.kernel.org/stable/c/dc4c854a5e7453c465fa73b153eba4ef2a240abenvd
- git.kernel.org/stable/c/df58651968f82344a0ed2afdafd20ecfc55ff548nvd
- git.kernel.org/stable/c/f37e7860dc5e94c70b4a3e38a5809181310ea9acnvd
News mentions
0No linked articles in our index yet.