CVE-2026-31514: erofs: set fileio bio failed in short read case
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
erofs: set fileio bio failed in short read case
For file-backed mount, IO requests are handled by vfs_iocb_iter_read(). However, it can be interrupted by SIGKILL, returning the number of bytes actually copied. Unused folios in bio are unexpectedly marked as uptodate.
vfs_read
filemap_read
filemap_get_pages
filemap_readahead
erofs_fileio_readahead
erofs_fileio_rq_submit
vfs_iocb_iter_read
filemap_read
filemap_get_pages <= detect signal
erofs_fileio_ki_complete <= set all folios uptodate
This patch addresses this by setting short read bio with an error directly.
The Linux kernel CVE team has assigned CVE-2026-31514 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.12.75 with commit 8d582d65d20bb4796db01b19e86909ad68cb337b and fixed in 6.12.80 with commit d1ba7d6b3cd1757b108d7b6856c92ae661d6c323 Issue introduced in 6.18.14 with commit e49abde0ffc382a967b24f326d1614ac3bb06a94 and fixed in 6.18.21 with commit 5cf3972c8221abdb1b464a14ccf8103d840b9085 Issue introduced in 6.19.4 with commit fe4039034dcdf584afbf763787909e28e92a4927 and fixed in 6.19.11 with commit 5a5f23ef5431639db1ac3a0b274aef3a84cc413c
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-31514
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/erofs/fileio.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/d1ba7d6b3cd1757b108d7b6856c92ae661d6c323 https://git.kernel.org/stable/c/5cf3972c8221abdb1b464a14ccf8103d840b9085 https://git.kernel.org/stable/c/5a5f23ef5431639db1ac3a0b274aef3a84cc413c https://git.kernel.org/stable/c/eade54040384f54b7fb330e4b0975c5734850b3c