CVE-2026-98245 PUBLISHED

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

Assigner: Linux
Reserved: 25.09.2026 Published: 06.10.2026 Updated: 06.10.2026

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.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 78ce9fc269af6e69c1399ab910ba6bc81c934f67 to 8e2007b263ea250251ec3021a0a197da990ee1a8 (excl.)
  • affected from 78ce9fc269af6e69c1399ab910ba6bc81c934f67 to 709f6a5e986535005110c6c69b322f63631cb200 (excl.)
  • affected from 78ce9fc269af6e69c1399ab910ba6bc81c934f67 to c32490c6d3f3a9f2d177d57c7eb8bbc347561d08 (excl.)
  • affected from 78ce9fc269af6e69c1399ab910ba6bc81c934f67 to 0594e3423f4ba3137c734371169491f9a98e9af4 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 5.12 is affected
  • unaffected from 0 to 5.12 (excl.)
  • unaffected from 6.12.112 to 6.12.* (incl.)
  • unaffected from 6.18.54 to 6.18.* (incl.)
  • unaffected from 7.2.8 to 7.2.* (incl.)
  • unaffected from 7.3-rc4 to * (incl.)

References