{
  "cveId": "CVE-2024-50217",
  "url": "https://patchblox.com/security/cve/CVE-2024-50217",
  "summary": "CVE-2024-50217 is fixed in linux on 1 platform, first by DEBIAN-CVE-2024-50217, released November 9, 2024. It is not reported as exploited. Patch Radar priority: High.",
  "title": "btrfs: fix use-after-free of block device file in __btrfs_free_extra_devids()",
  "description": "In the Linux kernel, the following vulnerability has been resolved:  btrfs: fix use-after-free of block device file in __btrfs_free_extra_devids()  Mounting btrfs from two images (which have the same one fsid and two different dev_uuids) in certain executing order may trigger an UAF for variable \u0027device-\u003Ebdev_file\u0027 in __btrfs_free_extra_devids(). And following are the details:  1. Attach image_1 to loop0, attach image_2 to loop1, and scan btrfs    devices by ioctl(BTRFS_IOC_SCAN_DEV):               /  btrfs_device_1 \u2192 loop0    fs_device              \\  btrfs_device_2 \u2192 loop1 2. mount /dev/loop0 /mnt    btrfs_open_devices     btrfs_device_1-\u003Ebdev_file = btrfs_get_bdev_and_sb(loop0)     btrfs_device_2-\u003Ebdev_file = btrfs_get_bdev_and_sb(loop1)    btrfs_fill_super     open_ctree      fail: btrfs_close_devices // -ENOMEM \t    btrfs_close_bdev(btrfs_device_1)              fput(btrfs_device_1-\u003Ebdev_file) \t      // btrfs_device_1-\u003Ebdev_file is freed \t    btrfs_close_bdev(btrfs_device_2)              fput(btrfs_device_2-\u003Ebdev_file)  3. mount /dev/loop1 /mnt    btrfs_open_devices     btrfs_get_bdev_and_sb(\u0026bdev_file)      // EIO, btrfs_device_1-\u003Ebdev_file is not assigned,      // which points to a freed memory area     btrfs_device_2-\u003Ebdev_file = btrfs_get_bdev_and_sb(loop1)    btrfs_fill_super     open_ctree      btrfs_free_extra_devids       if (btrfs_device_1-\u003Ebdev_file)        fput(btrfs_device_1-\u003Ebdev_file) // UAF !  Fix it by setting \u0027device-\u003Ebdev_file\u0027 as \u0027NULL\u0027 after closing the btrfs_device in btrfs_close_one_device().",
  "published": "2024-11-09T11:15:07Z",
  "severity": "Important",
  "cvss": 7.8,
  "cvssVector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
  "cwe": "Use After Free",
  "epss": 0.00278,
  "epssPercentile": 0.20381,
  "priority": "High",
  "priorityTier": 3,
  "exploited": false,
  "vendorExploited": false,
  "disclosed": false,
  "vendorAdvisory": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-50217",
  "fixes": [
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 13.5 (trixie)",
      "fixedVersion": "6.11.7-1",
      "fix": "DEBIAN-CVE-2024-50217",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2024-50217",
      "released": "2024-11-09T11:15:07Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 14",
      "fixedVersion": "6.11.7-1",
      "fix": "DEBIAN-CVE-2024-50217",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2024-50217",
      "released": "2024-11-09T11:15:07Z"
    }
  ],
  "noFixYet": [],
  "dataAsOf": "2026-11-08T19:12:23Z",
  "attribution": {
    "text": "Data: Patchblox Patch Radar",
    "url": "https://patchblox.com/security/patch-radar",
    "terms": "https://patchblox.com/security/patch-radar/use-the-data"
  }
}