CVE-2026-23423: btrfs: free pages on error in btrfs_uring_read_extent()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
btrfs: free pages on error in btrfs_uring_read_extent()
In this function the 'pages' object is never freed in the hopes that it is picked up by btrfs_uring_read_finished() whenever that executes in the future. But that's just the happy path. Along the way previous allocations might have gone wrong, or we might not get -EIOCBQUEUED from btrfs_encoded_read_regular_fill_pages(). In all these cases, we go to a cleanup section that frees all memory allocated by this function without assuming any deferred execution, and this also needs to happen for the 'pages' allocation.
The Linux kernel CVE team has assigned CVE-2026-23423 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.13 with commit 34310c442e175f286b4c06ab5caa4e0b267ea31c and fixed in 6.18.17 with commit d4f210de01eaccac61eee657f676045ef9771d07 Issue introduced in 6.13 with commit 34310c442e175f286b4c06ab5caa4e0b267ea31c and fixed in 6.19.7 with commit 628895890b0c9ac9129129e89455da7db95ba343 Issue introduced in 6.13 with commit 34310c442e175f286b4c06ab5caa4e0b267ea31c and fixed in 7.0-rc3 with commit 3f501412f2079ca14bf68a18d80a2b7a823f1f64
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-23423
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/d4f210de01eaccac61eee657f676045ef9771d07 https://git.kernel.org/stable/c/628895890b0c9ac9129129e89455da7db95ba343 https://git.kernel.org/stable/c/3f501412f2079ca14bf68a18d80a2b7a823f1f64