<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-09-29T16:51:47.521805+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/cve-2024-50217</id>
    <title>CVE-2024-50217 — btrfs: fix use-after-free of block device file in __btrfs_free_extra_devids()</title>
    <updated>2026-09-29T16:51:47.534065+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> Linux</p>
<p>In the Linux kernel, the following vulnerability has been resolved:</p>
<p>btrfs: fix use-after-free of block device file in __btrfs_free_extra_devids()</p>
<p>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 'device-&gt;bdev_file' in __btrfs_free_extra_devids(). And
following are the details:</p>
<p>1. Attach image_1 to loop0, attach image_2 to loop1, and scan btrfs
   devices by ioctl(BTRFS_IOC_SCAN_DEV):</p>
<p>/  btrfs_device_1 → loop0
   fs_device
             \  btrfs_device_2 → loop1
2. mount /dev/loop0 /mnt
   btrfs_open_devices
    btrfs_device_1-&gt;bdev_file = btrfs_get_bdev_and_sb(loop0)
    btrfs_device_2-&gt;bdev_file = btrfs_get_bdev_and_sb(loop1)
   btrfs_fill_super
    open_ctree
     fail: btrfs_close_devices // -ENOMEM
	    btrfs_close_bdev(btrfs_device_1)
             fput(btrfs_device_1-&gt;bdev_file)
	      // btrfs_device_1-&gt;bdev_file is freed
	    btrfs_close_bdev(btrfs_device_2)
             fput(btrfs_device_2-&gt;bdev_file)</p>
<p>3. mount /dev/loop1 /mnt
   btrfs_open_devices
    btrfs_get_bdev_and_sb(&amp;bdev_file)
     // EIO, btrfs_device_1-&gt;bdev_file is not assigned,
     // which points to a freed memory area
    btrfs_device_2-&gt;bdev_file = btrfs_get_bdev_and_sb(loop1)
   btrfs_fill_super
    open_ctree
     btrfs_free_extra_devids
      if (btrfs_device_1-&gt;bdev_file)
       fput(btrfs_device_1-&gt;bdev_file) // UAF !</p>
<p>Fix it by setting 'device-&gt;bdev_file' as 'NULL' after closing t…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/cve-2024-50217"/>
  </entry>
</feed>
