CVE-2026-98245

btrfs: take commit root semaphore when iterating in mark_block_group_to_copy()

Published Oct 6, 2026 CVSS 3.1 · 7.0 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

btrfs: take commit root semaphore when iterating in mark_block_group_to_copy()

mark_block_group_to_copy() iterates over the commit root with
skip_locking=true. A concurrent transaction commit can swap and free
the commit root during iteration, causing use-after-free when
accessing extent buffers.

Fix it by using path->need_commit_sem to protect the commit root search.

Analysis

AI-generated

Technical impact

The vulnerability resides in the Linux kernel’s btrfs file system implementation. During execution of mark_block_group_to_copy() the code iterates over the commit root with skip_locking set to true, but it does not hold the commit root semaphore. A concurrent transaction commit can therefore swap and free the commit root while the iteration is still in progress, causing a use-after-free of extent buffers. The resulting memory corruption occurs in privileged kernel context and could be abused to modify kernel state.

Affected Systems

All Linux kernel builds that ship the unpatched btrfs driver are affected. No specific release numbers are identified, so any distribution that includes the default btrfs implementation prior to the applied patch is at risk.

Risk and Exploitability

The flaw has a base CVSS score of 7.0 and an EPSS score of <1%, indicating a low predicted exploitation likelihood. The vulnerability is not listed in CISA’s KEV catalog. Exploitation would require an attacker to trigger a race condition via concurrent btrfs operations, generally necessitating local privileged access. No public exploits are known at this time.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that incorporates the btrfs commit root semaphore protection patch (CWE-825).
  • If a kernel upgrade cannot be performed immediately, remount all btrfs volumes as read‑only or disable btrfs to prevent write operations that might trigger the race condition.
  • If you maintain a custom or older kernel, apply the upstream patch locally, rebuild, and install the kernel to ensure the semaphore protection is present before rebooting.

Generated by OpenCVE AI on October 11, 2026 at 19:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4850-1 linux-6.12 security update
Debian DLA Debian DLA DLA-4906-1 linux security update
Debian DSA Debian DSA DSA-6568-1 linux security update
Ubuntu USN Ubuntu USN USN-9019-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9020-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9022-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9023-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9024-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9025-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9026-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9039-1 Linux kernel (Azure CVM) vulnerabilities
Ubuntu USN Ubuntu USN USN-9040-1 Linux kernel (Low Latency NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9066-1 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-9091-1 Linux kernel (NVIDIA Tegra) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: btrfs: take commit root semaphore when iterating in mark_block_group_to_copy() mark_block_group_to_copy() iterates over the commit root with skip_locking=true. A concurrent transaction commit can swap and free the commit root during iteration, causing use-after-free when accessing extent buffers. Fix it by using path->need_commit_sem to protect the commit root search.
Title btrfs: take commit root semaphore when iterating in mark_block_group_to_copy()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-825

    Expired Pointer Dereference

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 30, 2026, 12:37 PM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Oct 6, 2026, 9:18 AM
Modified
Oct 30, 2026, 1:21 PM
Severity
Moderate
Public date
Oct 6, 2026, 12:00 AM