CVE-2025-39759

High

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.

Package Linux Kernel
Published 2025-09-11
Last modified 2026-05-12
CVSS version 3.1
Patch available
Yes

CVSS 3.1 score

7.0

out of 10
High
Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Vector string
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Weakness type

CWE-362

CVE-2025-39759 is a Race Condition vulnerability

What is Race Condition?

The product contains a code sequence that can run concurrently with other code, creating unexpected states. Learn more on MITRE CWE

Affected versions

Linux kernel versions 3.12 and later are affected. Fixed in 6.1.149, 6.6.103, 6.12.44, 6.15.11, 6.16.2, 6.17 and their respective stable series.

Affected from
≥ 3.12
Fixed in
✓ 6.1.149 6.1.x ✓ 6.6.103 6.6.x ✓ 6.12.44 6.12.x ✓ 6.15.11 6.15.x ✓ 6.16.2 6.16.x ✓ 6.17

References

The following references provide additional information about CVE-2025-39759 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.

Frequently asked questions

  • What is CVE-2025-39759?

    CVE-2025-39759 is a High severity Linux kernel vulnerability with a CVSS score of 7.0 out of 10 , classified as a Race Condition flaw (CWE-362) . It affects Linux kernel versions from 3.12 onward and has been patched in 6.1.149, 6.6.103, 6.12.44 and others. CVE-2025-39759 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.

  • What is the CVSS score for CVE-2025-39759?

    CVE-2025-39759 has a CVSS score of 7.0 out of 10, rated High severity (CVSS 3.1). The vector string is CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H .

  • Is there a patch available for CVE-2025-39759?

    Yes — CVE-2025-39759 has been patched. Fixed versions include 6.1.149, 6.6.103, 6.12.44 and others. If you are running Linux kernel 3.12 or later up to the fix versions, apply the relevant patch for your kernel branch.

  • Is CVE-2025-39759 actively exploited?

    No — CVE-2025-39759 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.

  • What is Race Condition (CWE-362)?

    The product contains a code sequence that can run concurrently with other code, creating unexpected states. View CWE-362 on MITRE CWE →