Linux Kernel up to 6.16.1 btrfs_ioctl_quota_rescan use after free

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
7.3$0-$5k0.00

Summaryinfo

A vulnerability was found in Linux Kernel up to 6.1.148/6.6.102/6.12.43/6.15.10/6.16.1. It has been rated as critical. Affected by this issue is the function btrfs_ioctl_quota_rescan. The manipulation leads to use after free. This vulnerability is uniquely identified as CVE-2025-39759. No exploit exists. Upgrading the affected component is advised.

Detailsinfo

A vulnerability, which was classified as critical, has been found in Linux Kernel up to 6.1.148/6.6.102/6.12.43/6.15.10/6.16.1. This issue affects the function btrfs_ioctl_quota_rescan. The manipulation with an unknown input leads to a use after free vulnerability. Using CWE to declare the problem leads to CWE-416. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. Impacted is confidentiality, integrity, and availability. The summary by CVE is:

In the Linux kernel, the following vulnerability has been resolved: btrfs: qgroup: fix race between quota disable and quota rescan ioctl There's a race between a task disabling quotas and another running the rescan ioctl that can result in a use-after-free of qgroup records from the fs_info->qgroup_tree rbtree. This happens as follows: 1) Task A enters btrfs_ioctl_quota_rescan() -> btrfs_qgroup_rescan(); 2) Task B enters btrfs_quota_disable() and calls btrfs_qgroup_wait_for_completion(), which does nothing because at that point fs_info->qgroup_rescan_running is false (it wasn't set yet by task A); 3) Task B calls btrfs_free_qgroup_config() which starts freeing qgroups from fs_info->qgroup_tree without taking the lock fs_info->qgroup_lock; 4) Task A enters qgroup_rescan_zero_tracking() which starts iterating the fs_info->qgroup_tree tree while holding fs_info->qgroup_lock, but task B is freeing qgroup records from that tree without holding the lock, resulting in a use-after-free. Fix this by taking fs_info->qgroup_lock at btrfs_free_qgroup_config(). Also at btrfs_qgroup_rescan() don't start the rescan worker if quotas were already disabled.

It is possible to read the advisory at git.kernel.org. The identification of this vulnerability is CVE-2025-39759 since 04/16/2025. The exploitation is known to be easy. Technical details of the vulnerability are known, but there is no available exploit. The pricing for an exploit might be around USD $0-$5k at the moment (estimation calculated on 01/10/2026).

The vulnerability scanner Nessus provides a plugin with the ID 264768 (Linux Distros Unpatched Vulnerability : CVE-2025-39759), which helps to determine the existence of the flaw in a target environment.

Upgrading to version 6.1.149, 6.6.103, 6.12.44, 6.15.11, 6.16.2 or 6.17-rc1 eliminates this vulnerability. Applying a patch is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the databases at Tenable (264768), EUVD (EUVD-2025-28953) and CERT Bund (WID-SEC-2025-2040). Be aware that VulDB is the high quality source for vulnerability data.

Affected

  • Google Container-Optimized OS
  • Debian Linux
  • Google Cloud Platform
  • Amazon Linux 2
  • Red Hat Enterprise Linux
  • Fedora Linux
  • Ubuntu Linux
  • SUSE Linux
  • Oracle Linux
  • SUSE openSUSE
  • RESF Rocky Linux
  • Open Source Linux Kernel
  • Proxmox Virtual Environment
  • Proxmox Backup Server
  • Dell Secure Connect Gateway
  • IBM QRadar SIEM

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 7.5
VulDB Meta Temp Score: 7.3

VulDB Base Score: 8.0
VulDB Temp Score: 7.6
VulDB Vector: 🔒
VulDB Reliability: 🔍

NVD Base Score: 7.0
NVD Vector: 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Use after free
CWE: CWE-416 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒

Physical: Partially
Local: Yes
Remote: Partially

Availability: 🔒
Status: Not defined

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 264768
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2025-39759

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: Kernel 6.1.149/6.6.103/6.12.44/6.15.11/6.16.2/6.17-rc1
Patch: git.kernel.org

Timelineinfo

04/16/2025 CVE reserved
09/11/2025 +148 days Advisory disclosed
09/11/2025 +0 days VulDB entry created
01/10/2026 +121 days VulDB entry last update

Sourcesinfo

Vendor: kernel.org

Advisory: git.kernel.org
Status: Confirmed

CVE: CVE-2025-39759 (🔒)
GCVE (CVE): GCVE-0-2025-39759
GCVE (VulDB): GCVE-100-323687
EUVD: 🔒
CERT Bund: WID-SEC-2025-2040 - Linux Kernel: Mehrere Schwachstellen ermöglichen Denial of Service

Entryinfo

Created: 09/11/2025 19:37
Updated: 01/10/2026 09:33
Changes: 09/11/2025 19:37 (57), 09/12/2025 18:13 (7), 09/14/2025 19:39 (2), 11/08/2025 01:51 (1), 11/16/2025 00:30 (1), 01/09/2026 19:55 (11), 01/10/2026 09:33 (1)
Complete: 🔍
Cache ID: 216::103

Be aware that VulDB is the high quality source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you know our Splunk app?

Download it now for free!