Vulnerability · Published Oct 21, 2024 · Assigned by Linux

CVE-2024-49883ext4: aovid use-after-free in ext4_ext_insert_extent()

High 7.8

In plain English

A high-severity security flaw 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 20% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.3%top 79.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: ext4: aovid use-after-free in ext4_ext_insert_extent() As Ojaswin mentioned in Link, in ext4_ext_insert_extent(), if the path is reallocated in ext4_ext_create_new_leaf(), we'll use the stale path and cause UAF. Below is a sample trace with dummy values: ext4_ext_insert_extent path = *ppath = 2000 ext4_ext_create_new_leaf(ppath) ext4_find_extent(ppath) path = *ppath = 2000 if (depth > path[0].p_maxdepth) kfree(path = 2000); *ppath = path = NULL; path = kcalloc() = 3000 *ppath = 3000; return path; /* here path is still 2000, UAF! */ eh = path[depth].p_hdr ================================================================== BUG: KASAN: slab-use-after-free in ext4_ext_insert_extent+0x26d4/0x3330 Read of size 8 at addr ffff8881027bf7d0 by task kworker/u36:1/179 CPU: 3 UID: 0 PID: 179 Comm: kworker/u6:1 Not tainted 6.11.0-rc2-dirty #866 Call Trace: <TASK> ext4_ext_insert_extent+0x26d4/0x3330 ext4_ext_map_blocks+0xe22/0x2d40 ext4_map_blocks+0x71e/0x1700 ext4_do_writepages+0x1290/0x2800 [...] Allocated by task 179: ext4_find_extent+0x81c/0x1f70 ext4_ext_map_blocks+0x146/0x2d40 ext4_map_blocks+0x71e/0x1700 ext4_do_writepages+0x1290/0x2800 ext4_writepages+0x26d/0x4e0 do_writepages+0x175/0x700 [...] Freed by task 179: kfree+0xcb/0x240 ext4_find_extent+0x7c0/0x1f70 ext4_ext_insert_extent+0xa26/0x3330 ext4_ext_map_blocks+0xe22/0x2d40 ext4_map_blocks+0x71e/0x1700 ext4_do_writepages+0x1290/0x2800 ext4_writepages+0x26d/0x4e0 do_writepages+0x175/0x700 [...] ================================================================== So use *ppath to update the path to avoid the above problem.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.115-1DEBIAN-CVE-2024-49883
Debian:13linux6.11.4-1DEBIAN-CVE-2024-49883
Debian:14linux6.11.4-1DEBIAN-CVE-2024-49883
Ubuntu:22.04:LTSlinux5.15.0-127.137UBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux6.8.0-54.56UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-aws5.15.0-1073.79UBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-aws6.8.0-1023.25UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-aws-6.86.8.0-1023.25~22.04.1UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-azure5.15.0-1078.87UBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-azure6.8.0-1025.30UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-azure-6.116.11.0-1012.12~24.04.1UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-azure-6.86.8.0-1025.30~22.04.1UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1078.87.1UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-azure-nvidia6.8.0-1014.15UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-gcp5.15.0-1072.80UBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-gcp6.8.0-1024.26UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-gcp-6.116.11.0-1011.11~24.04.1UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-gcp-6.86.8.0-1024.26~22.04.1UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-gke5.15.0-1070.76UBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-gke6.8.0-1019.23UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1056.63UBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-gkeop6.8.0-1006.8UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-hwe-6.86.8.0-57.59~22.04.1UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-ibm5.15.0-1066.69UBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-ibm6.8.0-1022.22UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-ibm-6.86.8.0-1023.23~22.04.1UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1071.77UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-kvm5.15.0-1070.75UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-127.137UBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-54.56.1UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.86.8.0-54.56.1~22.04.1UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1068.69UBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1022.25UBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-nvidia-6.116.11.0-1007.7UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1022.25~22.04.2UBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1022.25.2UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1032.32UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1020.20UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-oem-6.116.11.0-1015.15UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-oem-6.86.8.0-1024.24UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-oracle5.15.0-1071.77UBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-oracle6.8.0-1020.21UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-oracle-6.86.8.0-1020.21~22.04.1UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-raspi5.15.0-1066.69UBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-raspi6.8.0-1019.23UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-riscv6.8.0-53.55.1UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-riscv-6.86.8.0-53.55.1~22.04.1UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2024-49883
Ubuntu:24.04:LTSlinux-xilinx6.8.0-1017.18UBUNTU-CVE-2024-49883
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1039.43UBUNTU-CVE-2024-49883

Affected products (as reported)

VendorProductVersions
Linux Linux 10809df84a4d868db61af621bae3658494165279 – before e17ebe4fdd7665c93ae9459ba40fcdfb76769ac110809df84a4d868db61af621bae3658494165279 – before 975ca06f3fd154c5f7742083e7b2574c57d1c0c310809df84a4d868db61af621bae3658494165279 – before 5e811066c5ab709b070659197dccfb80ab650ddd10809df84a4d868db61af621bae3658494165279 – before 9df59009dfc6d9fc1bd9ddf6c5ab6e56d6ed887a10809df84a4d868db61af621bae3658494165279 – before 51db04892a993cace63415be99848970a0f15ef210809df84a4d868db61af621bae3658494165279 – before 8162ee5d94b8c0351be0a9321be134872a7654a110809df84a4d868db61af621bae3658494165279 – before beb7b66fb489041c50c6473100b383f7a51648fc10809df84a4d868db61af621bae3658494165279 – before bfed082ce4b1ce6349b05c09a0fa4f3da35ecb1b
Linux Linux 3.18

References