CVE-2024-50217: btrfs: fix use-after-free of block device file in __btrfs_free_extra_devids()

Published Nov 9, 2024
·
Updated

btrfs: fix use-after-free of block device file in btrfsfreeextradevids()

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

13 affected componentsFixes available
Linux Linux kernel>=4.8<6.11.7
Linux Linux kernel=6.12-rc1
Linux Linux kernel=6.12-rc2
Linux Linux kernel=6.12-rc3
Linux Linux kernel=6.12-rc4
Linux Linux kernel=6.12-rc5
debian/linux<=5.10.223-1, <=5.10.234-1, <=6.1.129-1, <=6.1.135-1
6.12.22-16.12.25-1
Microsoft azl3 kernel 6.6.96.2-2
Microsoft azl3 kernel 6.6.117.1-1
Microsoft azl3 kernel 6.6.96.2-1
Microsoft azl3 kernel 6.6.112.1-2
Microsoft azl3 kernel 6.6.104.2-4
Microsoft cbl2 kernel 5.15.186.1-1

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.12.22-1Fixed in 6.12.25-1
  2. Configuration

    Apply the btrfs fix for CVE-2024-50217: in btrfs_close_one_device() set device->bdev_file to NULL after closing the btrfs_device (i.e., after btrfs_close_bdev()).

    Linux kernel btrfs device->bdev_file = NULL

Event History

Nov 9, 2024
CVE Published
via MITRE·10:14 AM
Data Sourced
via MITRE·10:14 AM
DescriptionSeverity
Data Sourced
via NVD·11:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Feb 20, 2025
Data Sourced
via Launchpad·12:46 AM
Description
Apr 29, 2025
Data Sourced
via Ubuntu·01:00 AM
RemedyDescriptionSeverityAffected Software
Sep 3, 2025
Data Sourced
via Microsoft·11:00 PM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·11:00 PM
Affected Software
Updated
via Microsoft·11:00 PM
DescriptionSeverity
Updated
via Microsoft·11:00 PM
Description

Frequently Asked Questions

1

What is the severity of CVE-2024-50217?

CVE-2024-50217 has a high severity rating due to potential use-after-free vulnerabilities in the Linux kernel's btrfs file system.

2

How do I fix CVE-2024-50217?

To fix CVE-2024-50217, update the Linux kernel to version 6.12 or later, or apply the specific patches provided by your distribution.

3

Which versions of the Linux kernel are affected by CVE-2024-50217?

CVE-2024-50217 affects Linux kernel versions from 4.8 up to 6.11.7, as well as specific 6.12 release candidates.

4

What is a use-after-free vulnerability as seen in CVE-2024-50217?

A use-after-free vulnerability allows an attacker to exploit memory management issues, potentially leading to crashes or arbitrary code execution.

5

Is there a public patch available for CVE-2024-50217?

Yes, patches for CVE-2024-50217 have been made available in the Linux kernel's repositories for affected versions.

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