CVE & CISA-KEV Catalog

CVE-2024-35956

MEDIUM
5.5
CVSS v3
NVD

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: qgroup: fix qgroup prealloc rsv leak in subvolume operations Create subvolume, create snapshot and delete subvolume all use btrfs_subvolume_reserve_metadata() to reserve metadata for the changes done to the parent subvolume's fs tree, which cannot be mediated in the normal way via start_transaction. When quota groups (squota or qgroups) are enabled, this reserves qgroup metadata of type PREALLOC. Once the operation is associated to a transaction, we convert PREALLOC to PERTRANS, which gets cleared in bulk at the end of the transaction. However, the error paths of these three operations were not implementing this lifecycle correctly. They unconditionally converted the PREALLOC to PERTRANS in a generic cleanup step regardless of errors or whether the operation was fully associated to a transaction or not. This resulted in error paths occasionally converting this rsv to PERTRANS without calling record_root_in_trans successfully, which meant that unless that root got recorded in the transaction by some other thread, the end of the transaction would not free that root's PERTRANS, leaking it. Ultimately, this resulted in hitting a WARN in CONFIG_BTRFS_DEBUG builds at unmount for the leaked reservation. The fix is to ensure that every qgroup PREALLOC reservation observes the following properties: 1. any failure before record_root_in_trans is called successfully results in freeing the PREALLOC reservation. 2. after record_root_in_trans, we convert to PERTRANS, and now the transaction owns freeing the reservation. This patch enforces those properties on the three operations. Without it, generic/269 with squotas enabled at mkfs time would fail in ~5-10 runs on my system. With this patch, it ran successfully 1000 times in a row.

How to fix

Remediation Available
linuxDebian
Fixed in:6.1.123-1CVE-2024-35956
Fixed in:6.8.9-1CVE-2024-35956
Fixed in:6.8.9-1CVE-2024-35956
linuxUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-awsUbuntu
Fixed in:6.8.0-1011.12USN-6893-3
linux-azureUbuntu
Fixed in:6.8.0-1010.10USN-6893-1
linux-gcpUbuntu
Fixed in:6.8.0-1010.11USN-6893-1
linux-gkeUbuntu
Fixed in:6.8.0-1006.9USN-6893-2
linux-ibmUbuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-6.8.0-1006-gkeUbuntu
Fixed in:6.8.0-1006.9USN-6893-2
linux-image-6.8.0-1007-intelUbuntu
Fixed in:6.8.0-1007.14USN-6893-1
linux-image-6.8.0-1007-raspiUbuntu
Fixed in:6.8.0-1007.7USN-6893-1
linux-image-6.8.0-1008-ibmUbuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-6.8.0-1008-oemUbuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-6.8.0-1008-oracleUbuntu
Fixed in:6.8.0-1008.8USN-6918-1
linux-image-6.8.0-1008-oracle-64kUbuntu
Fixed in:6.8.0-1008.8USN-6918-1
linux-image-6.8.0-1009-nvidiaUbuntu
Fixed in:6.8.0-1009.9USN-6893-2
linux-image-6.8.0-1009-nvidia-64kUbuntu
Fixed in:6.8.0-1009.9USN-6893-2
linux-image-6.8.0-1010-azureUbuntu
Fixed in:6.8.0-1010.10USN-6893-1
linux-image-6.8.0-1010-azure-fdeUbuntu
Fixed in:6.8.0-1010.10USN-6893-1
linux-image-6.8.0-1010-gcpUbuntu
Fixed in:6.8.0-1010.11USN-6893-1
linux-image-6.8.0-1011-awsUbuntu
Fixed in:6.8.0-1011.12USN-6893-3
linux-image-6.8.0-38-genericUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-6.8.0-38-generic-64kUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-6.8.0-38-lowlatencyUbuntu
Fixed in:6.8.0-38.38.1USN-6893-1
linux-image-6.8.0-38-lowlatency-64kUbuntu
Fixed in:6.8.0-38.38.1USN-6893-1
linux-image-awsUbuntu
Fixed in:6.8.0-1011.12USN-6893-3
linux-image-azureUbuntu
Fixed in:6.8.0-1010.10USN-6893-1
linux-image-azure-fdeUbuntu
Fixed in:6.8.0-1010.10USN-6893-1
linux-image-gcpUbuntu
Fixed in:6.8.0-1010.11USN-6893-1
linux-image-genericUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-generic-64kUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-generic-64k-hwe-24.04Ubuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-generic-hwe-24.04Ubuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-generic-lpaeUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-gkeUbuntu
Fixed in:6.8.0-1006.9USN-6893-2
linux-image-ibmUbuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-ibm-classicUbuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-ibm-lts-24.04Ubuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-intelUbuntu
Fixed in:6.8.0-1007.14USN-6893-1
linux-image-kvmUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-lowlatencyUbuntu
Fixed in:6.8.0-38.38.1USN-6893-1
linux-image-lowlatency-64kUbuntu
Fixed in:6.8.0-38.38.1USN-6893-1
linux-image-nvidiaUbuntu
Fixed in:6.8.0-1009.9USN-6893-2
linux-image-nvidia-64kUbuntu
Fixed in:6.8.0-1009.9USN-6893-2
linux-image-oem-24.04Ubuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-oem-24.04aUbuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-image-oracleUbuntu
Fixed in:6.8.0-1008.8USN-6918-1
linux-image-oracle-64kUbuntu
Fixed in:6.8.0-1008.8USN-6918-1
linux-image-raspiUbuntu
Fixed in:6.8.0-1007.7USN-6893-1
linux-image-virtualUbuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-image-virtual-hwe-24.04Ubuntu
Fixed in:6.8.0-38.38USN-6893-1
linux-intelUbuntu
Fixed in:6.8.0-1007.14USN-6893-1
linux-lowlatencyUbuntu
Fixed in:6.8.0-38.38.1USN-6893-1
linux-nvidiaUbuntu
Fixed in:6.8.0-1009.9USN-6893-2
linux-oem-6.8Ubuntu
Fixed in:6.8.0-1008.8USN-6893-1
linux-oracleUbuntu
Fixed in:6.8.0-1008.8USN-6918-1
linux-raspiUbuntu
Fixed in:6.8.0-1007.7USN-6893-1

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityNone
IntegrityNone
AvailabilityHigh

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Exploit Intelligence

0.23%probability of exploitation in 30 days
13thpercentile

Low risk: more likely to be exploited than 13% of all known CVEs.

References

Related Vulnerabilities

Other CWE-401 (Missing Release of Memory (Memory Leak)) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2020-13934High7.564%-Fix
CVE-2016-6304High7.563%-Fix
CVE-2019-12265Medium5.355%-Fix
CVE-2001-0136Medium5.045%--
CVE-2016-4232High7.536%--
CVE-2001-0543Medium5.021%--
Embed a live status badge for CVE-2024-35956
CVE-2024-35956 severity badge

Markdown

[![CVE-2024-35956](https://tridentstack.com/cve/badge/CVE-2024-35956.svg)](https://tridentstack.com/cve/CVE-2024-35956)

HTML

<a href="https://tridentstack.com/cve/CVE-2024-35956"><img src="https://tridentstack.com/cve/badge/CVE-2024-35956.svg" alt="CVE-2024-35956"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-11-03.