CVE-2024-40925: block: fix request.queuelist usage in flush
In the Linux kernel, the following vulnerability has been resolved:
block: fix request.queuelist usage in flush
Friedrich Weber reported a kernel crash problem and bisected to commit
81ada09cc25e ("blk-flush: reuse rq queuelist in flush state machine").
The root cause is that we use "list_move_tail(&rq->queuelist, pending)"
in the PREFLUSH/POSTFLUSH sequences. But rq->queuelist.next == xxx since
it's popped out from plug->cached_rq in __blk_mq_alloc_requests_batch().
We don't initialize its queuelist just for this first request, although
the queuelist of all later popped requests will be initialized.
Fix it by changing to use "list_add_tail(&rq->queuelist, pending)" so
rq->queuelist doesn't need to be initialized. It should be ok since rq
can't be on any list when PREFLUSH or POSTFLUSH, has no move actually.
Please note the commit 81ada09cc25e ("blk-flush: reuse rq queuelist in
flush state machine") also has another requirement that no drivers would
touch rq->queuelist after blk_mq_end_request() since we will reuse it to
add rq to the post-flush pending list in POSTFLUSH. If this is not true,
we will have to revert that commit IMHO.
This updated version adds "list_del_init(&rq->queuelist)" in flush rq
callback since the dm layer may submit request of a weird invalid format
(REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH), which causes double list_add
if without this "list_del_init(&rq->queuelist)". The weird invalid format
problem should be fixed in dm layer.
Security readout for executives and security teams
Plain-English summary
A Linux kernel block-layer flaw can corrupt internal request-list handling during storage flush operations, causing a kernel crash. The supplied CVSS assessment also allows high confidentiality, integrity, and availability impact from a local, low-privileged context. Internet exposure alone is not the attack path; affected hosts require prompt kernel assessment and maintenance planning.
Executive priority
High priority for affected Linux fleets, especially shared compute, container hosts, and systems allowing low-privileged local access. Schedule an expedited, controlled kernel update because successful triggering may crash the host and the CVSS assessment indicates broader impact. Emergency incident response is not supported solely by this bundle because active exploitation is unconfirmed.
Technical view
The flush state machine reused request.queuelist after the first batch-allocated request was removed from a cached request list without reinitialization. PREFLUSH or POSTFLUSH processing could therefore operate on invalid list state. The stable fixes use list_add_tail and add list_del_init in the callback to prevent invalid or duplicate list insertion, including an identified device-mapper edge case.
Likely exposure
Potential exposure is limited to systems running an affected Linux kernel and exercising the relevant block-device flush path. The bundle identifies versions including 6.6, 6.6.35, 6.9.6, and 6.10, but does not provide sufficiently clear range semantics. Confirm exact affected and fixed versions with the kernel or distribution vendor.
Exploitation context
The supplied CVSS vector describes local access, low privileges, low complexity, and no user interaction. A kernel crash was reported, but the sources provide no evidence of active exploitation or a public exploit. The CVE is not listed as KEV in the bundle. Treat crash evidence as possible exposure, not proof of malicious activity.
Researcher notes
The reported regression was bisected to commit 81ada09cc25e. The first request returned from __blk_mq_alloc_requests_batch retained stale queuelist pointers, making list_move_tail unsafe. The revised correction also handles duplicate insertion caused by an invalid combined PREFLUSH and POSTFLUSH format from device mapper. The bundle does not identify a CWE or establish practical exploitability beyond the reported crash.
Mitigation direction
Upgrade to a vendor-supported kernel containing the applicable stable fix.
Check distribution advisories for exact affected and fixed package versions.
Prioritize multi-user hosts and systems running untrusted local workloads.
Restrict unnecessary local accounts and workload privileges until patching completes.
Validation and detection
Inventory running kernel and installed kernel package versions across Linux systems.
Confirm vendor changelogs include an applicable referenced stable commit or equivalent backport.
Verify patched source uses safe request-list insertion and callback list reinitialization.
Review kernel logs for block-layer crashes, while recognizing crashes do not prove exploitation.
Reboot into the corrected kernel and confirm the running version afterward.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-40925 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.