CVE-2024-39496
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
12/07/2024
Last modified:
06/01/2026
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
btrfs: zoned: fix use-after-free due to race with dev replace<br />
<br />
While loading a zone&#39;s info during creation of a block group, we can race<br />
with a device replace operation and then trigger a use-after-free on the<br />
device that was just replaced (source device of the replace operation).<br />
<br />
This happens because at btrfs_load_zone_info() we extract a device from<br />
the chunk map into a local variable and then use the device while not<br />
under the protection of the device replace rwsem. So if there&#39;s a device<br />
replace operation happening when we extract the device and that device<br />
is the source of the replace operation, we will trigger a use-after-free<br />
if before we finish using the device the replace operation finishes and<br />
frees the device.<br />
<br />
Fix this by enlarging the critical section under the protection of the<br />
device replace rwsem so that all uses of the device are done inside the<br />
critical section.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.12 (including) | 6.1.95 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.35 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.9.6 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/0090d6e1b210551e63cf43958dc7a1ec942cdde9
- https://git.kernel.org/stable/c/092571ef9a812566c8f2c9038d9c2a64c49788d6
- https://git.kernel.org/stable/c/17765964703b88d8befd899f8501150bb7e07e43
- https://git.kernel.org/stable/c/a0cc006f4214b87e70983c692e05bb36c59b5752
- https://git.kernel.org/stable/c/0090d6e1b210551e63cf43958dc7a1ec942cdde9
- https://git.kernel.org/stable/c/092571ef9a812566c8f2c9038d9c2a64c49788d6
- https://git.kernel.org/stable/c/17765964703b88d8befd899f8501150bb7e07e43
- https://git.kernel.org/stable/c/a0cc006f4214b87e70983c692e05bb36c59b5752
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html



