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.
Metrics
Affected Vendors & Products
References
History
Wed, 11 Sep 2024 13:30:00 +0000
Type | Values Removed | Values Added |
---|---|---|
Metrics |
ssvc
|
Tue, 13 Aug 2024 10:30:00 +0000
Type | Values Removed | Values Added |
---|---|---|
Weaknesses | CWE-416 | |
Metrics |
cvssV3_1
|
cvssV3_1
|

Status: PUBLISHED
Assigner: Linux
Published: 2024-07-12T12:20:42.192Z
Updated: 2025-05-04T09:17:24.646Z
Reserved: 2024-07-12T12:17:45.579Z
Link: CVE-2024-40900

Updated: 2024-08-02T04:39:54.905Z

Status : Awaiting Analysis
Published: 2024-07-12T13:15:13.433
Modified: 2024-11-21T09:31:49.010
Link: CVE-2024-40900
