CVE-2024-40913
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: defer exposing anon_fd until after copy_to_user() succeeds<br />
<br />
After installing the anonymous fd, we can now see it in userland and close<br />
it. However, at this point we may not have gotten the reference count of<br />
the cache, but we will put it during colse fd, so this may cause a cache<br />
UAF.<br />
<br />
So grab the cache reference count before fd_install(). In addition, by<br />
kernel convention, fd is taken over by the user land after fd_install(),<br />
and the kernel should not call close_fd() after that, i.e., it should call<br />
fd_install() after everything is ready, thus fd_install() is called after<br />
copy_to_user() succeeds.
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/4b4391e77a6bf24cba2ef1590e113d9b73b11039
- https://git.kernel.org/stable/c/b9f58cdae6a364a3270fd6b6a46e0fd4f7f8ce32
- https://git.kernel.org/stable/c/d2d3eb377a5d081bf2bed177d354a4f59b74da88
- https://git.kernel.org/stable/c/eac51d9daacd61dcc93333ff6a890cf3efc8c1c0
- https://git.kernel.org/stable/c/4b4391e77a6bf24cba2ef1590e113d9b73b11039
- https://git.kernel.org/stable/c/b9f58cdae6a364a3270fd6b6a46e0fd4f7f8ce32
- https://git.kernel.org/stable/c/d2d3eb377a5d081bf2bed177d354a4f59b74da88
- https://git.kernel.org/stable/c/eac51d9daacd61dcc93333ff6a890cf3efc8c1c0
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html



