nday
CVE-2024-41050

cachefiles: cyclic allocation of msg_id to avoid reuse

Linux / Linux

Disclosed . nday has no fix record for it yet; that does not mean no patch exists. None of the four PoC sources lists it. Not in CISA KEV.

tags weakness typeuse-after-free accesslocalno user interaction productLinux kernel product typeoperating system
why these tags

nday derives these tags by fixed rules from the facts below; NVD, the CNA and other sources do not assign them. Vocabulary and rules: ~/tags.

use-after-free
CWE-416, stated by NVD's analysts
local
AV:L in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from NVD's analysts
no user interaction
UI:N in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from NVD's analysts
Linux kernel
affected products in the CVE record: Linux · LinuxCPE names NVD's analysts give as vulnerable: o:linux:linux_kernel
operating system
affected products in the CVE record: Linux · LinuxCPE names NVD's analysts give as vulnerable: o:linux:linux_kernelthe product type of Linux kernel in nday's product registry
stage
DIS
disclosed
cvss
no score yet

Lifecycle

x axis UTC; dot = exact minute, wide bar = date only, hollow = unknown or inferred.
time unknown
DISdisclosed
2024-07-29T14:32Z
PATpatch
no record yet
ANAanalysis
no record yet
POCPoC
no record yet
ITWexploited
no record yet
KEVKEV
no record yet

Summary

In the Linux kernel, the following vulnerability has been resolved:

cachefiles: cyclic allocation of msg_id to avoid reuse

Reusing the msg_id after a maliciously completed reopen request may cause a read request to remain unprocessed and result in a hung, as shown below:

t1 | t2 | t3 ------------------------------------------------- cachefiles_ondemand_select_req

 cachefiles_ondemand_object_is_close(A)
 cachefiles_ondemand_set_object_reopening(A)
 queue_work(fscache_object_wq, &info->work)
                ondemand_object_worker
                 cachefiles_ondemand_init_object(A)
                  cachefiles_ondemand_send_req(OPEN)
                    // get msg_id 6
                    wait_for_completion(&req_A->done)
cachefiles_ondemand_daemon_read
 // read msg_id 6 req_A
 cachefiles_ondemand_get_fd
 copy_to_user
                                // Malicious completion msg_id 6
                                copen 6,-1
                                cachefiles_ondemand_copen
                                 complete(&req_A->done)
                                 // will not set the object to close
                                 // because ondemand_id && fd is valid.

// ondemand_object_worker() is done // but the object is still reopening.

// new open req_B
cachefiles_ondemand_init_object(B)
 cachefiles_ondemand_send_req(OPEN)
 // reuse msg_id 6

process_open_req copen 6,A.size // The expected failed copen was executed successfully

Expect copen to fail, and when it does, it closes fd, which sets the object to close, and then close triggers reopen again. However, due to msg_id reuse resulting in a successful copen, the anonymous fd is not closed until the daemon exits. Therefore read requests waiting for reopen to complete may trigger hung task.

To avoid this issue, allocate the msg_id cyclically to avoid reusing the msg_id for a very short duration of time.

Original text of the CVE record (cvelist), shown as published.

Event log

+DISdisclosed

CVE record published by Linux.

src cvelist · nday , bulk import · raw
{
  "id": 337739,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2024-41050",
  "occurred_at": "2024-07-29T14:32:06.761Z",
  "observed_at": "2026-11-13T05:38:37.339084Z",
  "is_backfill": true,
  "dedupe_key": "",
  "detail": {
    "ssvc": {
      "timestamp": "2024-09-10T16:22:44.765096Z",
      "automatable": "no",
      "exploitation": "none",
      "technical_impact": "partial"
    },
    "state": "PUBLISHED",
    "date_published": "2024-07-29T14:32:06.761Z",
    "assigner_short_name": "Linux"
  }
}

Report an error

report an error or omission

Something on this page wrong or missing? Tell the editors; if they accept it, this page's revision log says so publicly. Upstream data is not changed.

Researcher discussion

0 researchers mentioned this in the last 7 days

Posts on X by researchers on nday's list that mention this CVE, shown as posted. nday does not check them.

nday has not collected any post on X by listed researchers that mentions this CVE.

Discussion

0 comments

No comments yet.