Skip to contentSkip to conversation

CVE-2026-98907: btrfs: protect sb_write_pointer() with invalidate lock

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 23

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

btrfs: protect sb_write_pointer() with invalidate lock

sb_write_pointer() reads the super block from the block device page cache using read_cache_page_gfp(). This has the same race with BLKBSZSET as the one fixed by commit 3f29d661e568 ("btrfs: sync read disk super and set block size").

Take the mapping invalidate lock around read_cache_page_gfp() to serialize the read against block size changes.

The Linux kernel CVE team has assigned CVE-2026-98907 to this issue.

Affected and fixed versions
===========================

	Fixed in 5.15.222 with commit c9b38f2eab5a9bd74087390318d93ccdd8d2deff
	Fixed in 6.1.189 with commit a0dc28359a8a26f970ccd250b126a2e0bd4118a5
	Fixed in 6.6.158 with commit 1a6c92aa7242a04e4349c0ea213dbf703a1c9891
	Fixed in 6.12.111 with commit a58cab4535f085adc0f93d7efd7952ef437371da
	Fixed in 6.18.53 with commit 80cd97c5e90096d040a623851795eac92fbd0ff1
	Fixed in 7.2 with commit 123b9a545f4d0348e81f558a032bf2a93ee5722f

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-98907

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/btrfs/zoned.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/c9b38f2eab5a9bd74087390318d93ccdd8d2deff
	https://git.kernel.org/stable/c/a0dc28359a8a26f970ccd250b126a2e0bd4118a5
	https://git.kernel.org/stable/c/1a6c92aa7242a04e4349c0ea213dbf703a1c9891
	https://git.kernel.org/stable/c/a58cab4535f085adc0f93d7efd7952ef437371da
	https://git.kernel.org/stable/c/80cd97c5e90096d040a623851795eac92fbd0ff1
	https://git.kernel.org/stable/c/123b9a545f4d0348e81f558a032bf2a93ee5722f