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-49854 Overview
CVE-2024-49854 is a use-after-free (UAF) vulnerability in the Linux kernel's Budget Fair Queueing (BFQ) I/O scheduler. The flaw resides in the block layer, specifically in how bfq_split_bfqq() handles references to the waker_bfqq structure after a BFQ queue split operation. When the current process is the last holder of a bfqq, the queue can be freed during the split, leaving dangling pointers in the waker chain. Subsequent access to bfqq->waker_bfqq triggers memory corruption. The vulnerability is classified under CWE-416.
Critical Impact
Local attackers with low privileges can trigger kernel memory corruption, potentially leading to privilege escalation, denial of service, or arbitrary code execution in kernel context.
Affected Products
- Linux Kernel (multiple stable branches prior to patched commits)
- Debian LTS distributions shipping affected kernel versions
- Downstream distributions using the BFQ I/O scheduler
Discovery Timeline
- 2024-10-21 - CVE-2024-49854 published to NVD
- 2025-01 - Debian LTS security announcement published
- 2026-08-04 - Last updated in NVD database
Technical Details for CVE-2024-49854
Vulnerability Analysis
The vulnerability exists in the BFQ I/O scheduler, a block layer component that provides fair bandwidth distribution across processes. The regression was introduced by commit 42c306ed7233 ("block, bfq: don't break merge chain in bfq_split_bfqq()"). After this change, bfq_split_bfqq() can release the final reference to a bfqq structure when the calling process is the last holder.
Code paths that cache a pointer to bfqq->waker_bfqq before calling bfq_split_bfqq() then dereference stale memory. Simply recording waker_bfqq before the split is also insufficient, because the waker queue may itself reside within the merge chain of the freed bfqq. Successful exploitation requires local access and low privileges, with no user interaction, and impacts confidentiality, integrity, and availability of the host kernel.
Root Cause
The root cause is improper reference tracking across a function boundary that can free the referenced object. bfq_split_bfqq() decrements and potentially releases the last reference to a BFQ queue, but callers continue to access the queue's waker_bfqq field afterward. Because the waker relationship can be transitive through the merge chain, caching either pointer prior to the split still leaves callers reading freed slab memory.
Attack Vector
An authenticated local user with the ability to issue block I/O operations on a device using the BFQ scheduler can craft workloads that force queue merging and splitting conditions. By racing I/O submission to influence waker-queue relationships, an attacker can trigger the dangling waker_bfqq dereference. The upstream fix introduces a helper, bfq_waker_bfqq(), that validates whether bfqq->waker_bfqq remains in the merge chain and whether the current process is the only holder before dereferencing. Refer to the kernel.org stable commits for the patched implementation.
Detection Methods for CVE-2024-49854
Indicators of Compromise
- Kernel oops or panic messages referencing bfq_split_bfqq, bfq_waker_bfqq, or bfq_bfqq_end_wr in dmesg output.
- KASAN use-after-free reports pointing at the block/bfq-iosched.c call sites on kernels built with address sanitization.
- Unexpected block I/O subsystem crashes on hosts configured to use the bfq I/O scheduler.
Detection Strategies
- Inventory running kernels against the fixed stable commits listed in the vendor advisories to identify unpatched hosts.
- Query hosts for the active I/O scheduler via cat /sys/block/*/queue/scheduler and flag systems using bfq.
- Correlate kernel ring buffer events with process privilege transitions to surface local exploitation attempts.
Monitoring Recommendations
- Forward /var/log/kern.log and journald kernel entries to a centralized log store and alert on BFQ-related stack traces.
- Monitor processes that spawn high-concurrency block I/O workloads from low-privilege contexts.
- Track anomalous privilege escalations following block subsystem crashes as a proxy for post-exploitation activity.
How to Mitigate CVE-2024-49854
Immediate Actions Required
- Apply the Linux kernel updates referenced in the stable tree commits for every affected branch deployed in the environment.
- Prioritize patching multi-tenant hosts, container nodes, and shared build systems where untrusted local users can submit I/O.
- Reboot hosts after kernel upgrade to activate the patched block layer code.
Patch Information
Fixes are available in the Linux stable tree. Review the upstream commits: 0780451f03bf, 0b8bda0ff171, 1ba0403ac644, 63a07379fdb6, cae58d19121a, and de0456460f2a. Debian users should install the kernel update described in the Debian LTS Announcement.
Workarounds
- Switch the I/O scheduler away from BFQ by writing an alternative such as mq-deadline or none to /sys/block/<device>/queue/scheduler on affected block devices.
- Rebuild kernels without CONFIG_IOSCHED_BFQ where distribution policy permits, eliminating the vulnerable code path entirely.
- Restrict local shell access on multi-user systems until patched kernels are deployed.
# Configuration example: switch all block devices off the BFQ scheduler
for dev in /sys/block/sd*/queue/scheduler /sys/block/nvme*/queue/scheduler; do
echo mq-deadline | sudo tee "$dev"
done
# Verify active scheduler
grep -H . /sys/block/*/queue/scheduler
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

