CVE-2024-40900

cachefiles: remove requests from xarray during flushing requests

HIGH
7.8
CVSS Score
Published: July 12, 2024 at 12:20 PM UTC
Updated: August 5, 2026 at 12:04 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: cachefiles: remove requests from xarray during flushing requests Even with CACHEFILES_DEAD set, we can still read the requests, so in the following concurrency the request may be used after it has been freed: mount | daemon_thread1 | daemon_thread2 ------------------------------------------------------------ cachefiles_ondemand_init_object cachefiles_ondemand_send_req REQ_A = kzalloc(sizeof(*req) + data_len) wait_for_completion(&REQ_A->done) cachefiles_daemon_read cachefiles_ondemand_daemon_read // close dev fd cachefiles_flush_reqs complete(&REQ_A->done) kfree(REQ_A) xa_lock(&cache->reqs); cachefiles_ondemand_select_req req->msg.opcode != CACHEFILES_OP_READ // req use-after-free !!! xa_unlock(&cache->reqs); xa_destroy(&cache->reqs) Hence remove requests from cache->reqs when flushing them to avoid accessing freed requests.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.19 ≤ v < 6.1.955.19 ≤ v < 6.105.19 ≤ v < 6.6.355.19 ≤ v < 6.9.66.2 ≤ v < 6.6.356.7 ≤ v < 6.9.66.10 rc16.10 rc26.10 rc3c8383054506c77b814489c09877b5db83fd4abf2
Vendor states this is fixed in 0fc75c5940fa634d84e64c93bfc388e1274ed013 (fixed)
Vendor states this is fixed in 37e19cf86a520d65de1de9cb330415c332a40d19 (fixed)
Vendor states this is fixed in 50d0e55356ba5b84ffb51c42704126124257e598 (fixed)
Vendor states this is fixed in 9f13aacdd4ee9a7644b2a3c96d67113cd083c9c7 (fixed)
Vendor states this is fixed in 5.19 (unaffected)
Vendor states this is fixed in 6.1.95 (unaffected)
Vendor states this is fixed in 6.10 (unaffected)
Vendor states this is fixed in 6.6.35 (unaffected)
Vendor states this is fixed in 6.9.6 (unaffected)

References (5)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0fc75c5940fa634d84e64c93bfc388e1274ed013
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/37e19cf86a520d65de1de9cb330415c332a40d19
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/50d0e55356ba5b84ffb51c42704126124257e598
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9f13aacdd4ee9a7644b2a3c96d67113cd083c9c7
Source: af854a3a-2127-422b-91ae-364da2661108
https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.8HIGHLinux
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card