CVE-2024-40935
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
12/07/2024
Last modified:
03/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
cachefiles: flush all requests after setting CACHEFILES_DEAD<br />
<br />
In ondemand mode, when the daemon is processing an open request, if the<br />
kernel flags the cache as CACHEFILES_DEAD, the cachefiles_daemon_write()<br />
will always return -EIO, so the daemon can&#39;t pass the copen to the kernel.<br />
Then the kernel process that is waiting for the copen triggers a hung_task.<br />
<br />
Since the DEAD state is irreversible, it can only be exited by closing<br />
/dev/cachefiles. Therefore, after calling cachefiles_io_error() to mark<br />
the cache as CACHEFILES_DEAD, if in ondemand mode, flush all requests to<br />
avoid the above hungtask. We may still be able to read some of the cached<br />
data before closing the fd of /dev/cachefiles.<br />
<br />
Note that this relies on the patch that adds reference counting to the req,<br />
otherwise it may UAF.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.19 (including) | 6.1.95 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.35 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.9.6 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.10:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.10:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.10:rc3:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/320ba9cbca78be79c912143bbba1d1b35ca55cf0
- https://git.kernel.org/stable/c/3bf0b8030296e9ee60d3d4c15849ad9ac0b47081
- https://git.kernel.org/stable/c/85e833cd7243bda7285492b0653c3abb1e2e757b
- https://git.kernel.org/stable/c/e73fac95084839c5178d97e81c6a2051251bdc00
- https://git.kernel.org/stable/c/320ba9cbca78be79c912143bbba1d1b35ca55cf0
- https://git.kernel.org/stable/c/3bf0b8030296e9ee60d3d4c15849ad9ac0b47081
- https://git.kernel.org/stable/c/85e833cd7243bda7285492b0653c3abb1e2e757b
- https://git.kernel.org/stable/c/e73fac95084839c5178d97e81c6a2051251bdc00
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html



