Vulnerability · Published Jul 12, 2024 · Assigned by Linux
CVE-2024-39496btrfs: zoned: fix use-after-free due to race with dev replace
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 21% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: btrfs: zoned: fix use-after-free due to race with dev replace While loading a zone's info during creation of a block group, we can race with a device replace operation and then trigger a use-after-free on the device that was just replaced (source device of the replace operation). This happens because at btrfs_load_zone_info() we extract a device from the chunk map into a local variable and then use the device while not under the protection of the device replace rwsem. So if there's a device replace operation happening when we extract the device and that device is the source of the replace operation, we will trigger a use-after-free if before we finish using the device the replace operation finishes and frees the device. Fix this by enlarging the critical section under the protection of the device replace rwsem so that all uses of the device are done inside the critical section.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.99-1 | DEBIAN-CVE-2024-39496 |
| Debian:12 | linux | 6.1.99-1 | DSA-5731-1 |
| Debian:13 | linux | 6.9.7-1 | DEBIAN-CVE-2024-39496 |
| Debian:14 | linux | 6.9.7-1 | DEBIAN-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux | 5.15.0-122.132 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux | 5.15.0-122.132 | USN-7021-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-44.44 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1070.76 | USN-7021-1 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1070.76 | UBUNTU-CVE-2024-39496 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1015.16 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1015.16~22.04.1 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1073.82 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1073.82 | USN-7021-1 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1014.16 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1073.82.1 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1073.82.1 | USN-7021-5 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1069.77 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1069.77 | USN-7021-1 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1014.16 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1067.73 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1067.73 | USN-7021-1 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1010.13 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1053.60 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1053.60 | USN-7021-1 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-45.45~22.04.1 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1063.66 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1063.66 | USN-7021-1 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1012.12 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1065.71 | USN-7021-1 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1065.71 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1067.72 | USN-7021-1 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1067.72 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-122.132 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-122.132 | USN-7021-3 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-44.44.1 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1065.66 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1065.66 | USN-7021-1 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1013.14 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1013.14~22.04.1 | UBUNTU-CVE-2024-39496 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1013.14.1 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1030.30 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1019.19 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1012.12 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1068.74 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1068.74 | USN-7021-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1012.12 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1063.66 | USN-7021-1 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1063.66 | UBUNTU-CVE-2024-39496 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1011.12 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-44.44.1 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1036.40 | UBUNTU-CVE-2024-39496 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1036.40 | USN-7021-2 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 5b316468983dfa9473ff0f1c42e4e30b4c267141 – before 17765964703b88d8befd899f8501150bb7e07e435b316468983dfa9473ff0f1c42e4e30b4c267141 – before 092571ef9a812566c8f2c9038d9c2a64c49788d65b316468983dfa9473ff0f1c42e4e30b4c267141 – before a0cc006f4214b87e70983c692e05bb36c59b57525b316468983dfa9473ff0f1c42e4e30b4c267141 – before 0090d6e1b210551e63cf43958dc7a1ec942cdde9 |
| Linux | Linux | 5.11 |
References
- https://git.kernel.org/stable/c/17765964703b88d8befd899f8501150bb7e07e43
- https://git.kernel.org/stable/c/092571ef9a812566c8f2c9038d9c2a64c49788d6
- https://git.kernel.org/stable/c/a0cc006f4214b87e70983c692e05bb36c59b5752
- https://git.kernel.org/stable/c/0090d6e1b210551e63cf43958dc7a1ec942cdde9
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html