Skip to contentSkip to conversation

CVE-2026-98961: btrfs: unlock inode and extent in caller when io_uring read extent fails

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: unlock inode and extent in caller when io_uring read extent fails

btrfs_uring_read_extent() runs only after btrfs_encoded_read() has taken the inode shared lock and the extent lock. On failure it used to unlock in out_fail, and a pages-array allocation failure returned -ENOMEM without unlocking at all.

Unlock in the caller instead on all failure returns, matching the copy_to_user() error path. The deferred -EIOCBQUEUED path still unlocks in btrfs_uring_read_finished().

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

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

	Issue introduced in 6.13 with commit 34310c442e175f286b4c06ab5caa4e0b267ea31c and fixed in 6.18.57 with commit 2797eb38773a96914ccedeec71eb2144645400b2
	Issue introduced in 6.13 with commit 34310c442e175f286b4c06ab5caa4e0b267ea31c and fixed in 7.2.11 with commit ada1fc725a4db407294ae90a0d40ef1c46f457f2
	Issue introduced in 6.13 with commit 34310c442e175f286b4c06ab5caa4e0b267ea31c and fixed in 7.3 with commit b6e8add5d79d1f6f819a054c833bab452bd7365d

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-98961

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/ioctl.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/2797eb38773a96914ccedeec71eb2144645400b2
	https://git.kernel.org/stable/c/ada1fc725a4db407294ae90a0d40ef1c46f457f2
	https://git.kernel.org/stable/c/b6e8add5d79d1f6f819a054c833bab452bd7365d