CVE-2024-39496: btrfs: zoned: fix use-after-free due to race with dev replace

Published Jul 12, 2024
·
Updated

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

9 affected componentsFixes available
Linux Linux kernel<6.1.95
Linux Linux kernel>=6.2<6.6.35
Linux Linux kernel>=6.7<6.9.6
debian/linux<=5.10.223-1, <=5.10.234-1
6.1.137-16.1.135-16.12.27-1
debian/linux-6.1
6.1.129-1~deb11u1
Debian Debian Linux=11.0
Linux Linux kernel>=5.12<6.1.95
Microsoft azl3 kernel 6.6.35.1-5
Microsoft azl3 kernel 6.6.22.1-2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.137-1Fixed in 6.1.135-1Fixed in 6.12.27-1
  2. Upgrade

    Upgrade debian/linux-6.1 to a version that resolves this vulnerability.

    Fixed in 6.1.129-1~deb11u1
  3. 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

Jul 12, 2024
CVE Published
via MITRE·12:20 PM
Data Sourced
via MITRE·12:20 PM
DescriptionSeverity
Data Sourced
via NVD·01:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Sep 11, 2024
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
Sep 19, 2024
Data Sourced
via Launchpad·04:29 PM
Description
Apr 27, 2025
Data Sourced
via Ubuntu·05:19 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203