Executive brief
The Linux kernel's ESSIV cryptographic wrapper module incorrectly frees memory associated with backlogged encryption/decryption requests, leading to a use-after-free vulnerability. An attacker with local access could trigger this condition to cause a kernel crash or potentially execute arbitrary code, disrupting system availability or compromising the confidentiality of encrypted data.
Technical details
This is a use-after-free vulnerability in the crypto/essiv.c module of the Linux kernel. The ESSIV wrapper only checked for the -EINPROGRESS return code when deciding whether to free request-associated data (the `assoc` buffer). However, when the MAY_BACKLOG flag is set by callers, the underlying crypto operation can return -EBUSY to indicate the request has been queued for later processing. The code would incorrectly free this data even when -EBUSY was returned, and then attempt to use it again when the request completed, triggering a use-after-free. The fix adds a check to also skip freeing when -EBUSY is returned, treating it identically to -EINPROGRESS. The vulnerability was introduced in commit be1eb7f78aa8 and patched in commit b5a772adf45a32c68bef28e60621f12617161556. Local network access to trigger backlogged crypto operations is required.
Affected products
- Linux Linux kernel affected versions include linux-5.x and linux-6.x series prior to patches
Timeline
- 2023-01-13: disclosed: Upstream commit authored by Herbert Xu
- 2025-12-24: advisory: CVE-2023-54046 published