Executive brief
The Linux kernel's XTS encryption mode did not properly handle backlogged cryptographic requests, causing premature memory deallocation that could lead to use-after-free crashes. This affects systems relying on kernel-level encryption for data protection, potentially disrupting services that depend on cryptographic operations or allowing an authenticated local attacker to trigger a denial of service.
Technical details
The vulnerability is a use-after-free in the XTS cipher mode implementation (crypto/xts.c). The root cause is incomplete error handling: the code only checked for EINPROGRESS return values when calling xts_cts_final(), but when MAY_BACKLOG flag is set on a request, the kernel crypto subsystem can also return EBUSY to indicate the request is queued. Requests returning EBUSY should not have their data freed immediately, similar to EINPROGRESS. An attacker with the ability to submit crypto requests (local, typically requiring some privilege) can trigger this by creating backlogged XTS encryption/decryption operations, causing the kernel to free memory while the request is still pending, resulting in heap corruption and potential DoS. The fix simply adds EBUSY to the return-code check alongside EINPROGRESS.
Affected products
- Linux Linux kernel Versions with XTS ciphertext stealing support (from commit 8083b1bf8163 onwards); fixed in 2023-01-27
Timeline
- 2023-01-27: disclosed: Patch committed by Herbert Xu
- 2025-10-01: advisory: CVE-2023-53494 published