Vulnerability · Published Jun 25, 2024 · Assigned by Linux
CVE-2024-394639p: add missing locking around taking dentry fid list
High 7.8
In plain English
A high-severity use-after-free in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: 9p: add missing locking around taking dentry fid list Fix a use-after-free on dentry's d_fsdata fid list when a thread looks up a fid through dentry while another thread unlinks it: UAF thread: refcount_t: addition on 0; use-after-free. p9_fid_get linux/./include/net/9p/client.h:262 v9fs_fid_find+0x236/0x280 linux/fs/9p/fid.c:129 v9fs_fid_lookup_with_uid linux/fs/9p/fid.c:181 v9fs_fid_lookup+0xbf/0xc20 linux/fs/9p/fid.c:314 v9fs_vfs_getattr_dotl+0xf9/0x360 linux/fs/9p/vfs_inode_dotl.c:400 vfs_statx+0xdd/0x4d0 linux/fs/stat.c:248 Freed by: p9_fid_destroy (inlined) p9_client_clunk+0xb0/0xe0 linux/net/9p/client.c:1456 p9_fid_put linux/./include/net/9p/client.h:278 v9fs_dentry_release+0xb5/0x140 linux/fs/9p/vfs_dentry.c:55 v9fs_remove+0x38f/0x620 linux/fs/9p/vfs_inode.c:518 vfs_unlink+0x29a/0x810 linux/fs/namei.c:4335 The problem is that d_fsdata was not accessed under d_lock, because d_release() normally is only called once the dentry is otherwise no longer accessible but since we also call it explicitly in v9fs_remove that lock is required: move the hlist out of the dentry under lock then unref its fids once they are no longer accessible.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.94-1 | DEBIAN-CVE-2024-39463 |
| Debian:13 | linux | 6.9.7-1 | DEBIAN-CVE-2024-39463 |
| Debian:14 | linux | 6.9.7-1 | DEBIAN-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux | 5.15.0-127.137 | USN-7166-1 |
| Ubuntu:22.04:LTS | linux | 5.15.0-127.137 | UBUNTU-CVE-2024-39463 |
| Ubuntu:24.04:LTS | linux | 6.8.0-44.44 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1073.79 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1073.79 | USN-7166-2 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1015.16 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1015.16~22.04.1 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1078.87 | USN-7186-2 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1078.87 | UBUNTU-CVE-2024-39463 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1014.16 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1078.87.1 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1072.80 | USN-7166-1 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1072.80 | UBUNTU-CVE-2024-39463 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1014.16 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1070.76 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1070.76 | USN-7166-1 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1010.13 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1056.63 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1056.63 | USN-7166-1 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-45.45~22.04.1 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1066.69 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1066.69 | USN-7166-1 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1012.12 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1071.77 | USN-7186-1 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1071.77 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1070.75 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1070.75 | USN-7166-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-127.137 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-127.137 | USN-7166-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-44.44.1 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1068.69 | USN-7166-1 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1068.69 | UBUNTU-CVE-2024-39463 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1013.14 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1013.14~22.04.1 | UBUNTU-CVE-2024-39463 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1013.14.1 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1032.32 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1020.20 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1012.12 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1071.77 | USN-7166-1 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1071.77 | UBUNTU-CVE-2024-39463 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1012.12 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1066.69 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1066.69 | USN-7166-1 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1011.12 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-44.44.1 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-39463 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1039.43 | USN-7166-4 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1039.43 | UBUNTU-CVE-2024-39463 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 154372e67d4053e56591245eb413686621941333 – before 3bb6763a8319170c2d41c4232c8e7e4c37dcacfb154372e67d4053e56591245eb413686621941333 – before cb299cdba09f46f090b843d78ba26b667d50a456154372e67d4053e56591245eb413686621941333 – before f0c5c944c6d8614c19e6e9a97fd2011dcd30e8f5154372e67d4053e56591245eb413686621941333 – before fe17ebf22feb4ad7094d597526d558a49aac92b4154372e67d4053e56591245eb413686621941333 – before c898afdc15645efb555acb6d85b484eb40a45409 |
| Linux | Linux | 5.11 |
Weakness: CWE-416 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://git.kernel.org/stable/c/3bb6763a8319170c2d41c4232c8e7e4c37dcacfb
- https://git.kernel.org/stable/c/cb299cdba09f46f090b843d78ba26b667d50a456
- https://git.kernel.org/stable/c/f0c5c944c6d8614c19e6e9a97fd2011dcd30e8f5
- https://git.kernel.org/stable/c/fe17ebf22feb4ad7094d597526d558a49aac92b4
- https://git.kernel.org/stable/c/c898afdc15645efb555acb6d85b484eb40a45409
- https://www.zerodayinitiative.com/advisories/ZDI-24-1194/