CVE-2024-40913
Linux Kernel cachefiles Use-After-Free Vulnerability
Description
In the Linux kernel, the following vulnerability has been resolved: cachefiles: defer exposing anon_fd until after copy_to_user() succeeds After installing the anonymous fd, we can now see it in userland and close it. However, at this point we may not have gotten the reference count of the cache, but we will put it during colse fd, so this may cause a cache UAF. So grab the cache reference count before fd_install(). In addition, by kernel convention, fd is taken over by the user land after fd_install(), and the kernel should not call close_fd() after that, i.e., it should call fd_install() after everything is ready, thus fd_install() is called after copy_to_user() succeeds.
INFO
Published Date :
July 12, 2024, 1:15 p.m.
Last Modified :
Nov. 21, 2024, 9:31 a.m.
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Remotely Exploitable :
No
Impact Score :
Exploitability Score :
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2024-40913
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2024-40913
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-40913
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/4b4391e77a6bf24cba2ef1590e113d9b73b11039 Added Reference https://git.kernel.org/stable/c/b9f58cdae6a364a3270fd6b6a46e0fd4f7f8ce32 Added Reference https://git.kernel.org/stable/c/d2d3eb377a5d081bf2bed177d354a4f59b74da88 Added Reference https://git.kernel.org/stable/c/eac51d9daacd61dcc93333ff6a890cf3efc8c1c0 -
CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jul. 12, 2024
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: cachefiles: defer exposing anon_fd until after copy_to_user() succeeds After installing the anonymous fd, we can now see it in userland and close it. However, at this point we may not have gotten the reference count of the cache, but we will put it during colse fd, so this may cause a cache UAF. So grab the cache reference count before fd_install(). In addition, by kernel convention, fd is taken over by the user land after fd_install(), and the kernel should not call close_fd() after that, i.e., it should call fd_install() after everything is ready, thus fd_install() is called after copy_to_user() succeeds. Added Reference kernel.org https://git.kernel.org/stable/c/eac51d9daacd61dcc93333ff6a890cf3efc8c1c0 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/d2d3eb377a5d081bf2bed177d354a4f59b74da88 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/b9f58cdae6a364a3270fd6b6a46e0fd4f7f8ce32 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/4b4391e77a6bf24cba2ef1590e113d9b73b11039 [No types assigned]
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-40913
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-40913
weaknesses.