CVE-2024-39496
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
12/07/2024
Last modified:
24/07/2024
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:linux:linux_kernel:*:*:*:*:*:*:*:* | 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