<?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://vulnerability.circl.lu</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>Wed, 30 Sep 2026 08:34:47 +0000</lastBuildDate>
    <item>
      <title>CVE-2023-54158 — btrfs: don't free qgroup space unless specified</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2023-54158</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: don&amp;#39;t free qgroup space unless specified&lt;/p&gt;
&lt;p&gt;Boris noticed in his simple quotas testing that he was getting a leak
with Sweet Tea&amp;#39;s change to subvol create that stopped doing a
transaction commit.  This was just a side effect of that change.&lt;/p&gt;
&lt;p&gt;In the delayed inode code we have an optimization that will free extra
reservations if we think we can pack a dir item into an already modified
leaf.  Previously this wouldn&amp;#39;t be triggered in the subvolume create
case because we&amp;#39;d commit the transaction, it was still possible but
much harder to trigger.  It could actually be triggered if we did a
mkdir &amp;amp;&amp;amp; subvol create with qgroups enabled.&lt;/p&gt;
&lt;p&gt;This occurs because in btrfs_insert_delayed_dir_index(), which gets
called when we&amp;#39;re adding the dir item, we do the following:&lt;/p&gt;
&lt;p&gt;btrfs_block_rsv_release(fs_info, trans-&amp;gt;block_rsv, bytes, NULL);&lt;/p&gt;
&lt;p&gt;if we&amp;#39;re able to skip reserving space.&lt;/p&gt;
&lt;p&gt;The problem here is that trans-&amp;gt;block_rsv points at the temporary block
rsv for the subvolume create, which has qgroup reservations in the block
rsv.&lt;/p&gt;
&lt;p&gt;This is a problem because btrfs_block_rsv_release() will do the
following:&lt;/p&gt;
&lt;p&gt;if (block_rsv-&amp;gt;qgroup_rsv_reserved &amp;gt;= block_rsv-&amp;gt;qgroup_rsv_size) {
	  qgroup_to_release = block_rsv-&amp;gt;qgroup_rsv_reserved -
		  block_rsv-&amp;gt;qgroup_rsv_size;
	  block_rsv-&amp;gt;qgroup_rsv_reserved = block_rsv-&amp;gt;qgroup_rsv_size;
  }&lt;/p&gt;
&lt;p&gt;The temporary block rsv just has -&amp;gt;qgroup_rsv_reserved set,
-&amp;gt;qgroup_rsv_size == 0.  The optimiza…&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: don&amp;#39;t free qgroup space unless specified&lt;/p&gt;
&lt;p&gt;Boris noticed in his simple quotas testing that he was getting a leak
with Sweet Tea&amp;#39;s change to subvol create that stopped doing a
transaction commit.  This was just a side effect of that change.&lt;/p&gt;
&lt;p&gt;In the delayed inode code we have an optimization that will free extra
reservations if we think we can pack a dir item into an already modified
leaf.  Previously this wouldn&amp;#39;t be triggered in the subvolume create
case because we&amp;#39;d commit the transaction, it was still possible but
much harder to trigger.  It could actually be triggered if we did a
mkdir &amp;amp;&amp;amp; subvol create with qgroups enabled.&lt;/p&gt;
&lt;p&gt;This occurs because in btrfs_insert_delayed_dir_index(), which gets
called when we&amp;#39;re adding the dir item, we do the following:&lt;/p&gt;
&lt;p&gt;btrfs_block_rsv_release(fs_info, trans-&amp;gt;block_rsv, bytes, NULL);&lt;/p&gt;
&lt;p&gt;if we&amp;#39;re able to skip reserving space.&lt;/p&gt;
&lt;p&gt;The problem here is that trans-&amp;gt;block_rsv points at the temporary block
rsv for the subvolume create, which has qgroup reservations in the block
rsv.&lt;/p&gt;
&lt;p&gt;This is a problem because btrfs_block_rsv_release() will do the
following:&lt;/p&gt;
&lt;p&gt;if (block_rsv-&amp;gt;qgroup_rsv_reserved &amp;gt;= block_rsv-&amp;gt;qgroup_rsv_size) {
	  qgroup_to_release = block_rsv-&amp;gt;qgroup_rsv_reserved -
		  block_rsv-&amp;gt;qgroup_rsv_size;
	  block_rsv-&amp;gt;qgroup_rsv_reserved = block_rsv-&amp;gt;qgroup_rsv_size;
  }&lt;/p&gt;
&lt;p&gt;The temporary block rsv just has -&amp;gt;qgroup_rsv_reserved set,
-&amp;gt;qgroup_rsv_size == 0.  The optimiza…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2023-54158</guid>
    </item>
  </channel>
</rss>
