# CVE-2026-98245: btrfs: take commit root semaphore when iterating in mark_block_group_to_copy()

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 6% of CVEs (2026-11-30)
- Published: 2026-10-06T08:45:14.758Z
- Modified: 2026-10-30T13:21:12.203Z
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 78ce9fc269af6e69c1399ab910ba6bc81c934f67 before 90242b776df83f8b1ea901f80b568b4fc2318c61; from 78ce9fc269af6e69c1399ab910ba6bc81c934f67 before bffe773f92885603db14047bba0f12089105929e; from 78ce9fc269af6e69c1399ab910ba6bc81c934f67 before 93a025166495c63ba5b8ac721c7040d5312e8335; from 78ce9fc269af6e69c1399ab910ba6bc81c934f67 before 8e2007b263ea250251ec3021a0a197da990ee1a8; from 78ce9fc269af6e69c1399ab910ba6bc81c934f67 before 709f6a5e986535005110c6c69b322f63631cb200; from 78ce9fc269af6e69c1399ab910ba6bc81c934f67 before c32490c6d3f3a9f2d177d57c7eb8bbc347561d08; from 78ce9fc269af6e69c1399ab910ba6bc81c934f67 before 0594e3423f4ba3137c734371169491f9a98e9af4; 5.12 (not affected: before 5.12; from 5.15.224 up to 5.15.*; from 6.1.191 up to 6.1.*; from 6.6.160 up to 6.6.*; from 6.12.112 up to 6.12.*; from 6.18.54 up to 6.18.*; from 7.2.8 up to 7.2.*; from 7.3 up to *)

## References

- <https://git.kernel.org/stable/c/90242b776df83f8b1ea901f80b568b4fc2318c61>
- <https://git.kernel.org/stable/c/bffe773f92885603db14047bba0f12089105929e>
- <https://git.kernel.org/stable/c/93a025166495c63ba5b8ac721c7040d5312e8335>
- <https://git.kernel.org/stable/c/8e2007b263ea250251ec3021a0a197da990ee1a8>
- <https://git.kernel.org/stable/c/709f6a5e986535005110c6c69b322f63631cb200>
- <https://git.kernel.org/stable/c/c32490c6d3f3a9f2d177d57c7eb8bbc347561d08>
- <https://git.kernel.org/stable/c/0594e3423f4ba3137c734371169491f9a98e9af4>

## Sources

- CVE List: [CVE-2026-98245](https://www.cve.org/CVERecord?id=CVE-2026-98245), CVE Terms of Use, modified 2026-10-30
- NVD: [CVE-2026-98245](https://nvd.nist.gov/vuln/detail/CVE-2026-98245), Public domain, modified 2026-10-30

---

Page: https://cve.day/CVE-2026-98245 · Whole record: https://cve.day/CVE-2026-98245.json · Rebuilt by cve.day 2026-11-25T22:59:42.301Z
