Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-53166 Overview
CVE-2024-53166 is a use-after-free (UAF) vulnerability in the Linux kernel's Budget Fair Queueing (BFQ) I/O scheduler. The flaw resides in bfq_limit_depth(), which dereferences a bfqq pointer from a bic (bfq_io_cq) structure without holding the required bfqd->lock. When an io_context is shared across multiple tasks, a concurrent task can free the bfqq while another dereferences it, triggering memory corruption. The bug is classified under [CWE-416: Use After Free]. Local attackers with the ability to issue block I/O, including through io_uring, can trigger the condition and compromise kernel memory integrity.
Critical Impact
Local attackers can trigger a kernel use-after-free in the BFQ scheduler through concurrent I/O on a shared io_context, enabling potential privilege escalation and loss of confidentiality, integrity, and availability.
Affected Products
- Linux Kernel (upstream, pre-patch commits)
- Debian LTS distributions (per Debian LTS announcement, May 2025)
- Siemens industrial products referenced in advisories SSA-082556 and SSA-784472
Discovery Timeline
- 2024-12-27 - CVE-2024-53166 published to the National Vulnerability Database (NVD)
- 2026-10-15 - Last updated in NVD database
Technical Details for CVE-2024-53166
Vulnerability Analysis
The BFQ scheduler associates each process io_context with a per-queue descriptor through the bic_to_bfqq() accessor. Assignment of a newly allocated bfqq to a bic, or detachment of a freed bfqq from a bic, is serialized by bfqd->lock. The bfq_limit_depth() path violates this invariant by reading the bfqq pointer from the bic without acquiring the lock.
When an io_context is shared across multiple tasks, as happens with io_uring workers performing read and write submissions concurrently, one task can free the bfqq through bfq_put_queue() while another task is still inside bfq_limit_depth() traversing the stale pointer. KASAN reports confirm the race by capturing a slab-use-after-free in bfqq_group() reached through bfqq_request_over_limit().
Root Cause
The root cause is missing lock acquisition around bic_to_bfqq() inside bfq_limit_depth(). The lifecycle of bfqq is governed by bfqd->lock, but the depth-limiting path reads the pointer outside the critical section. The upstream fix extends bfqd->lock coverage to the bic_to_bfqq() dereference so that free and read operations cannot interleave.
Attack Vector
Exploitation requires local access and the ability to submit block I/O against a device using the BFQ scheduler. An attacker shares a single io_context across multiple threads or io_uring workers and issues concurrent reads and writes. Winning the race corrupts kernel slab memory, which can be shaped into kernel code execution and privilege escalation. The CVSS vector AV:L/AC:L/PR:L/UI:N reflects local, low-complexity, low-privilege prerequisites.
No verified public proof-of-concept code is available. The upstream commit message describes the KASAN-reproducible race using io_uring on kernel 6.6. Refer to the Linux Kernel Commit e8b8344 for the authoritative patch.
Detection Methods for CVE-2024-53166
Indicators of Compromise
- KASAN reports showing slab-use-after-free in bfqq_group or bfqq_request_over_limit call paths in dmesg or kernel logs
- Unexpected kernel oops or panic traces originating from bfq_limit_depth+0x1b5/0x480 on affected kernels
- Processes using io_uring with shared io_context performing high-concurrency reads and writes against BFQ-scheduled block devices
Detection Strategies
- Enumerate running kernel versions and compare against the fixed stable branches referenced in the kernel.org commits
- Audit block devices for the active I/O scheduler using cat /sys/block/<dev>/queue/scheduler and flag systems where bfq is active
- Monitor kernel ring buffer for KASAN, slab, or general protection fault signatures referencing bfq_ symbols
Monitoring Recommendations
- Centralize kernel log collection and alert on crash signatures containing bfq_limit_depth, bfqq_group, or bfq_put_queue
- Track unexpected reboots and kernel panics on hosts running workloads that heavily use io_uring
- Correlate anomalous privilege transitions following kernel errors to surface post-exploitation attempts
How to Mitigate CVE-2024-53166
Immediate Actions Required
- Apply the upstream Linux kernel patches referenced in the kernel.org stable commits and reboot affected systems
- Update Debian systems to the versions listed in the Debian LTS Announcement May 2025
- Deploy Siemens firmware updates referenced in SSA-082556 and SSA-784472 for impacted industrial products
- Restrict io_uring availability on multi-tenant hosts where kernel updates cannot be applied immediately
Patch Information
The fix extends bfqd->lock coverage to protect bic_to_bfqq() inside bfq_limit_depth(). Verified stable-tree commits include 01a853f, 906cdbd, dcaa738, and e8b8344. Administrators should install distribution kernels that incorporate these commits.
Workarounds
- Switch affected block devices away from BFQ to mq-deadline or none using echo mq-deadline > /sys/block/<dev>/queue/scheduler
- Disable io_uring for unprivileged users by setting kernel.io_uring_disabled=2 via sysctl where supported
- Limit sharing of io_context across tasks by avoiding workloads that fork or clone with CLONE_IO on vulnerable kernels
# Configuration example: change scheduler and restrict io_uring
for dev in /sys/block/sd*/queue/scheduler; do
echo mq-deadline > "$dev"
done
# Disable io_uring for unprivileged users (kernel >= 6.6)
sysctl -w kernel.io_uring_disabled=2
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

