CVE-2023-54209
Description
In the Linux kernel, the following vulnerability has been resolved:
block: fix blktrace debugfs entries leakage
Commit 99d055b4fd4b ("block: remove per-disk debugfs files in blk_unregister_queue") moves blk_trace_shutdown() from blk_release_queue() to blk_unregister_queue(), this is safe if blktrace is created through sysfs, however, there is a regression in corner case.
blktrace can still be enabled after del_gendisk() through ioctl if the disk is opened before del_gendisk(), and if blktrace is not shutdown through ioctl before closing the disk, debugfs entries will be leaked.
Fix this problem by shutdown blktrace in disk_release(), this is safe because blk_trace_remove() is reentrant.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Linux kernel blktrace debugfs entries leak when enabled via ioctl after del_gendisk() and not shutdown, fixed by moving shutdown to disk_release().
A debugfs entry leak in the Linux kernel's blktrace subsystem arises from a change in commit 99d055b4fd4b, which moved blk_trace_shutdown() from blk_release_queue() to blk_unregister_queue(). While this is safe for sysfs-based blktrace setup, it introduces a regression: after a disk is removed via del_gendisk(), blktrace can still be enabled through an ioctl if the disk was opened before removal. If the user does not subsequently disable blktrace via ioctl before closing the disk, the associated debugfs entries are never freed, causing a resource leak [1].
The vulnerability requires local access to the system and the ability to issue ioctl commands on a block device. Specifically, an attacker must have the privileges needed to enable blktrace (typically CAP_SYS_ADMIN) and must be able to open the disk before it is removed. The attack surface is limited to systems where users can trigger disk removal while retaining an open file descriptor on the device.
The primary impact is the exhaustion of debugfs entries, which could lead to denial-of-service conditions by consuming kernel memory or preventing further debugfs allocations. No code execution or privilege escalation is implied by the description.
The fix, introduced in commit [1], addresses the leak by calling blk_trace_shutdown() in disk_release(), ensuring that any remaining blktrace state is cleaned up when the disk's last reference is dropped. The function blk_trace_remove() is reentrant, making this safe. Users should apply the latest stable kernel updates to mitigate the issue.
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
4aa07e56c6a9c7149e57cf011942e81650b81dd7de3704af9Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4News mentions
0No linked articles in our index yet.