All reports
Medium

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

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2026-98245

Probability of exploitation in the next 30 days: 0.17%

FIRST EPSS · 2026-11-22

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.

A flaw was found in the Linux kernel's Btrfs file system. A local user could exploit this vulnerability to cause a Denial of Service (DoS) or potentially escalate privileges. The issue occurs due to missing synchronization during device replacement operations, where a concurrent transaction commit can free memory while it is actively being accessed, resulting in a use-after-free condition.