In the Linux kernel, the following vulnerability has been resolved:
btrfs: don't free qgroup space unless specified
Boris noticed in his simple quotas testing that he was getting a leak with Sweet Tea's change to subvol create that stopped doing a transaction commit. This was just a side effect of that change.
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't be triggered in the subvolume create case because we'd commit the transaction, it was still possible but much harder to trigger. It could actually be triggered if we did a mkdir && subvol create with qgroups enabled.
This occurs because in btrfs_insert_delayed_dir_index(), which gets called when we're adding the dir item, we do the following:
btrfs_block_rsv_release(fs_info, trans->block_rsv, bytes, NULL);
if we're able to skip reserving space.
The problem here is that trans->block_rsv points at the temporary block rsv for the subvolume create, which has qgroup reservations in the block rsv.
This is a problem because btrfs_block_rsv_release() will do the following:
if (block_rsv->qgroup_rsv_reserved >= block_rsv->qgroup_rsv_size) { qgroup_to_release = block_rsv->qgroup_rsv_reserved - block_rsv->qgroup_rsv_size; block_rsv->qgroup_rsv_reserved = block_rsv->qgroup_rsv_size; }
The temporary block rsv just has ->qgroup_rsv_reserved set, ->qgroup_rsv_size == 0. The optimization in btrfs_insert_delayed_dir_index() sets ->qgroup_rsv_reserved = 0. Then later on when we call btrfs_subvolume_release_metadata() which has
btrfs_block_rsv_release(fs_info, rsv, (u64)-1, &qgroup_to_release); btrfs_qgroup_convert_reserved_meta(root, qgroup_to_release);
qgroup_to_release is set to 0, and we do not convert the reserved metadata space.
The problem here is that the block rsv code has been unconditionally messing with ->qgroup_rsv_reserved, because the main place this is used is delalloc, and any time we call btrfs_block_rsv_release() we do it with qgroup_to_release set, and thus do the proper accounting.
The subvolume code is the only other code that uses the qgroup reservation stuff, but it's intermingled with the above optimization, and thus was getting its reservation freed out from underneath it and thus leaking the reserved space.
The solution is to simply not mess with the qgroup reservations if we don't have qgroup_to_release set. This works with the existing code as anything that messes with the delalloc reservations always have qgroup_to_release set. This fixes the leak that Boris was observing.
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Amazon Linux Ami 2 | — | Upgrade python-perf-debuginfoUpgrade kernel-debuginfo-common-aarch64Upgrade perf-debuginfoUpgrade kernel-toolsUpgrade kernel-tools-develUpgrade perfUpgrade kernel-livepatch-5.15.117-72.142Upgrade kernelUpgrade kernel-debuginfoUpgrade kernel-tools-debuginfoUpgrade python-perfUpgrade bpftool-debuginfoUpgrade kernel-develUpgrade kernel-headersUpgrade kernel-debuginfo-common-x86_64Upgrade kernel-livepatch-5.10.184-174.730Upgrade bpftool | May 20, 2026 | May 20, 2026 |
| Debian | — | Upgrade linux | Dec 29, 2025 | Dec 29, 2025 |
| Huawei Euleros 2_0_sp13 | — | Upgrade kernelUpgrade python3-perfUpgrade kernel-abi-stablelistsUpgrade kernel-toolsUpgrade bpftoolUpgrade kernel-tools-libs | Mar 10, 2026 | Mar 10, 2026 |
| Ubuntu | — | Upgrade linux-raspi-5.4Upgrade linux-azure-5.4Upgrade linux-bluefieldUpgrade linux-awsUpgrade linux-ibmUpgrade linux-nvidia-tegra-igxUpgrade linux-gcp-5.4Upgrade linux-realtimeUpgrade linux-intel-iot-realtimeUpgrade linux-aws-fipsUpgrade linux-gcpUpgrade linux-hwe-5.4Upgrade linux-lowlatency-hwe-5.15Upgrade linux-gcp-fipsUpgrade linux-intel-iotg-5.15Upgrade linux-iotUpgrade linux-hwe-5.15Upgrade linux-oracle-5.15Upgrade linux-xilinx-zynqmpUpgrade linuxUpgrade linux-aws-5.15Upgrade linux-nvidiaUpgrade linux-nvidia-tegraUpgrade linux-gkeopUpgrade linux-azureUpgrade linux-lowlatencyUpgrade linux-kvmUpgrade linux-gkeUpgrade linux-azure-fde-5.15Upgrade linux-ibm-5.4Upgrade linux-raspiUpgrade linux-azure-5.15Upgrade linux-aws-5.4Upgrade linux-oracle-5.4Upgrade linux-ibm-5.15Upgrade linux-gcp-5.15Upgrade linux-azure-fipsUpgrade linux-nvidia-tegra-5.15Upgrade linux-intel-iotgUpgrade linux-oracleUpgrade linux-riscv-5.15Upgrade linux-fips | Jan 6, 2026 | Dec 24, 2025 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | May 27, 2026 | Dec 24, 2025 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub