CVE-2024-40913

High

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.

SeverityHigh
CVSS7.8
Exploit probability—
ProductLinux Kernel
PublishedJul 12, 2024
First seenJul 12, 2024

How to fix

Update
  • linux linux_kernel6.1.95, 6.6.35, 6.9.6 or later

Affected products

ProductAffected versionsFixed in
linux linux_kernel5.19 ≤ v < 6.1.95, 6.2 ≤ v < 6.6.35, 6.7 ≤ v < 6.9.6, 6.106.1.95, 6.6.35, 6.9.6

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.