CVE-2024-39496: btrfs: zoned: fix use-after-free due to race with dev replace
btrfs: zoned: fix use-after-free due to race with dev replace
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.137-1Fixed in 6.1.135-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1 - Configuration
In the btrfs zoned codepath, fix the race by enlarging the critical section under the protection of the device replace rwsem so that all uses of the extracted device are done inside the critical section; specifically, ensure the device extracted in btrfs_load_zone_info() from the chunk map is used only while protected by the dev replace rwsem to prevent use-after-free when a device replace frees the source device.
Linux kernel (btrfs zoned) dev replace critical section synchronization (dev replace rwsem) = Enlarge the critical section so all uses of the device are performed while holding device replace rwsem (btrfs_load_zone_info)
Event History
Frequently Asked Questions
What is the severity of CVE-2024-39496?
CVE-2024-39496 has a severity level that indicates potential risks of memory corruption issues in the Linux kernel.
How do I fix CVE-2024-39496?
To fix CVE-2024-39496, update your Linux kernel to version 6.1.123-1 or the specific patched versions as per your distribution.
Which versions of the Linux kernel are affected by CVE-2024-39496?
CVE-2024-39496 affects Linux kernel versions from 6.1.95 up to 6.6.35, as well as versions from 6.7 to 6.9.6.
What type of vulnerability is represented by CVE-2024-39496?
CVE-2024-39496 is classified as a use-after-free vulnerability due to a race condition during device replacement in the btrfs file system.
Is CVE-2024-39496 specific to any Linux distributions?
CVE-2024-39496 is relevant to any distribution utilizing the affected versions of the Linux kernel, including Debian and its derivatives.