<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://cve.radiocsirt.org</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Mon, 12 Oct 2026 09:28:40 +0000</lastBuildDate>
    <item>
      <title>CVE-2022-49079 — btrfs: zoned: traverse devices under chunk_mutex in btrfs_can_activate_zone</title>
      <link>https://cve.radiocsirt.org/vuln/cve-2022-49079</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Linux&lt;/p&gt;
&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;btrfs: zoned: traverse devices under chunk_mutex in btrfs_can_activate_zone&lt;/p&gt;
&lt;p&gt;btrfs_can_activate_zone() can be called with the device_list_mutex already
held, which will lead to a deadlock:&lt;/p&gt;
&lt;p&gt;insert_dev_extents() // Takes device_list_mutex
`-&amp;gt; insert_dev_extent()
 `-&amp;gt; btrfs_insert_empty_item()
  `-&amp;gt; btrfs_insert_empty_items()
   `-&amp;gt; btrfs_search_slot()
    `-&amp;gt; btrfs_cow_block()
     `-&amp;gt; __btrfs_cow_block()
      `-&amp;gt; btrfs_alloc_tree_block()
       `-&amp;gt; btrfs_reserve_extent()
        `-&amp;gt; find_free_extent()
         `-&amp;gt; find_free_extent_update_loop()
          `-&amp;gt; can_allocate_chunk()
           `-&amp;gt; btrfs_can_activate_zone() // Takes device_list_mutex again&lt;/p&gt;
&lt;p&gt;Instead of using the RCU on fs_devices-&amp;gt;device_list we
can use fs_devices-&amp;gt;alloc_list, protected by the chunk_mutex to traverse
the list of active devices.&lt;/p&gt;
&lt;p&gt;We are in the chunk allocation thread. The newer chunk allocation
happens from the devices in the fs_device-&amp;gt;alloc_list protected by the
chunk_mutex.&lt;/p&gt;
&lt;p&gt;btrfs_create_chunk()
    lockdep_assert_held(&amp;amp;info-&amp;gt;chunk_mutex);
    gather_device_info
      list_for_each_entry(device, &amp;amp;fs_devices-&amp;gt;alloc_list, dev_alloc_list)&lt;/p&gt;
&lt;p&gt;Also, a device that reappears after the mount won&amp;#39;t join the alloc_list
yet and, it will be in the dev_list, which we don&amp;#39;t want to consider in
the context of the chunk alloc.&lt;/p&gt;
&lt;p&gt;[15.166572] WARNING: possible recursive locking detected
  [15.167117] 5.17.0-rc6-dennis #79 Not tainted
  [15.167…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Linux&lt;/p&gt;
&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;btrfs: zoned: traverse devices under chunk_mutex in btrfs_can_activate_zone&lt;/p&gt;
&lt;p&gt;btrfs_can_activate_zone() can be called with the device_list_mutex already
held, which will lead to a deadlock:&lt;/p&gt;
&lt;p&gt;insert_dev_extents() // Takes device_list_mutex
`-&amp;gt; insert_dev_extent()
 `-&amp;gt; btrfs_insert_empty_item()
  `-&amp;gt; btrfs_insert_empty_items()
   `-&amp;gt; btrfs_search_slot()
    `-&amp;gt; btrfs_cow_block()
     `-&amp;gt; __btrfs_cow_block()
      `-&amp;gt; btrfs_alloc_tree_block()
       `-&amp;gt; btrfs_reserve_extent()
        `-&amp;gt; find_free_extent()
         `-&amp;gt; find_free_extent_update_loop()
          `-&amp;gt; can_allocate_chunk()
           `-&amp;gt; btrfs_can_activate_zone() // Takes device_list_mutex again&lt;/p&gt;
&lt;p&gt;Instead of using the RCU on fs_devices-&amp;gt;device_list we
can use fs_devices-&amp;gt;alloc_list, protected by the chunk_mutex to traverse
the list of active devices.&lt;/p&gt;
&lt;p&gt;We are in the chunk allocation thread. The newer chunk allocation
happens from the devices in the fs_device-&amp;gt;alloc_list protected by the
chunk_mutex.&lt;/p&gt;
&lt;p&gt;btrfs_create_chunk()
    lockdep_assert_held(&amp;amp;info-&amp;gt;chunk_mutex);
    gather_device_info
      list_for_each_entry(device, &amp;amp;fs_devices-&amp;gt;alloc_list, dev_alloc_list)&lt;/p&gt;
&lt;p&gt;Also, a device that reappears after the mount won&amp;#39;t join the alloc_list
yet and, it will be in the dev_list, which we don&amp;#39;t want to consider in
the context of the chunk alloc.&lt;/p&gt;
&lt;p&gt;[15.166572] WARNING: possible recursive locking detected
  [15.167117] 5.17.0-rc6-dennis #79 Not tainted
  [15.167…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://cve.radiocsirt.org/vuln/cve-2022-49079</guid>
    </item>
  </channel>
</rss>
