Description
In the Linux kernel, the following vulnerability has been resolved:
fuse: don't shorten the folio descriptor at LLONG_MAX
fuse_send_readpages() and fuse_do_readfolio() both decrement the folio
descriptor length when handling the overflow case where a read would
exceed LLONG_MAX after incrementing the file position by the number of
bytes that need to be read in.
Shortening it is unnecessary (and for the virtio-fs paths, a bug), and
with fuse using iomap for handling reads, shortening it is buggy.
For fuse_send_readpages(), ap->descs[] is also what fuse_readpages_end()
reports back to iomap_finish_folio_read(). iomap accounted the full
length when the range was submitted, so the lengths reported on
completion have to add up to what was submitted. Reporting one byte less
leaves ifs->read_bytes_pending nonzero, folio_end_read() is never called,
and the folio stays locked.
This is currently reachable on fuseblk mounts configured with block
sizes smaller than the page size.
Fix this by leaving the descriptor length untouched. The reply will then
be one byte shorter than what the descriptor lengths add up to, and the
last byte will be zeroed in fuse_copy_folios().
This also fixes a bug in virtio-fs that existed before any iomap changes
were added to fuse. For virtio-fs, data there arrives by DMA rather than
through fuse_copy_folios(), so the only zeroing is in
virtio_fs_request_complete(), which compares the reply size against the
descriptor length. With the descriptor length shortened, the two are
equal and nothing gets zeroed, which means the unrequested byte is left
holding whatever was in the folio, when the folio is marked uptodate.
This is both in the fuse_do_readfolio() and fuse_send_readpages() paths.
This dates back to commit 2f1398291bf3 ("fuse: don't overflow LLONG_MAX
with end offset").
fuse: don't shorten the folio descriptor at LLONG_MAX
fuse_send_readpages() and fuse_do_readfolio() both decrement the folio
descriptor length when handling the overflow case where a read would
exceed LLONG_MAX after incrementing the file position by the number of
bytes that need to be read in.
Shortening it is unnecessary (and for the virtio-fs paths, a bug), and
with fuse using iomap for handling reads, shortening it is buggy.
For fuse_send_readpages(), ap->descs[] is also what fuse_readpages_end()
reports back to iomap_finish_folio_read(). iomap accounted the full
length when the range was submitted, so the lengths reported on
completion have to add up to what was submitted. Reporting one byte less
leaves ifs->read_bytes_pending nonzero, folio_end_read() is never called,
and the folio stays locked.
This is currently reachable on fuseblk mounts configured with block
sizes smaller than the page size.
Fix this by leaving the descriptor length untouched. The reply will then
be one byte shorter than what the descriptor lengths add up to, and the
last byte will be zeroed in fuse_copy_folios().
This also fixes a bug in virtio-fs that existed before any iomap changes
were added to fuse. For virtio-fs, data there arrives by DMA rather than
through fuse_copy_folios(), so the only zeroing is in
virtio_fs_request_complete(), which compares the reply size against the
descriptor length. With the descriptor length shortened, the two are
equal and nothing gets zeroed, which means the unrequested byte is left
holding whatever was in the folio, when the folio is marked uptodate.
This is both in the fuse_do_readfolio() and fuse_send_readpages() paths.
This dates back to commit 2f1398291bf3 ("fuse: don't overflow LLONG_MAX
with end offset").
Published:
2026-11-30
Score:
n/a
EPSS:
n/a
KEV:
No
Analysis and contextual insights are available on OpenCVE Cloud.
Remediation
No solution or workaround provided in the CVE record.
Additional remediation guidance may be available on OpenCVE Cloud.
Tracking
Sign in to view the affected projects.
Advisories
No advisories yet.
References
History
Mon, 30 Nov 2026 13:30:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Description | In the Linux kernel, the following vulnerability has been resolved: fuse: don't shorten the folio descriptor at LLONG_MAX fuse_send_readpages() and fuse_do_readfolio() both decrement the folio descriptor length when handling the overflow case where a read would exceed LLONG_MAX after incrementing the file position by the number of bytes that need to be read in. Shortening it is unnecessary (and for the virtio-fs paths, a bug), and with fuse using iomap for handling reads, shortening it is buggy. For fuse_send_readpages(), ap->descs[] is also what fuse_readpages_end() reports back to iomap_finish_folio_read(). iomap accounted the full length when the range was submitted, so the lengths reported on completion have to add up to what was submitted. Reporting one byte less leaves ifs->read_bytes_pending nonzero, folio_end_read() is never called, and the folio stays locked. This is currently reachable on fuseblk mounts configured with block sizes smaller than the page size. Fix this by leaving the descriptor length untouched. The reply will then be one byte shorter than what the descriptor lengths add up to, and the last byte will be zeroed in fuse_copy_folios(). This also fixes a bug in virtio-fs that existed before any iomap changes were added to fuse. For virtio-fs, data there arrives by DMA rather than through fuse_copy_folios(), so the only zeroing is in virtio_fs_request_complete(), which compares the reply size against the descriptor length. With the descriptor length shortened, the two are equal and nothing gets zeroed, which means the unrequested byte is left holding whatever was in the folio, when the folio is marked uptodate. This is both in the fuse_do_readfolio() and fuse_send_readpages() paths. This dates back to commit 2f1398291bf3 ("fuse: don't overflow LLONG_MAX with end offset"). | |
| Title | fuse: don't shorten the folio descriptor at LLONG_MAX | |
| First Time appeared |
Linux
Linux linux Kernel |
|
| CPEs | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | |
| Vendors & Products |
Linux
Linux linux Kernel |
|
| References |
|
Status: PUBLISHED
Assigner: Linux
Published:
Updated: 2026-11-30T13:26:44.252Z
Reserved: 2026-11-30T13:22:15.907Z
Link: CVE-2026-138977
No data.
Status : Received
Published: 2026-11-30T14:17:59.840
Modified: 2026-11-30T14:17:59.840
Link: CVE-2026-138977
No data.
OpenCVE Enrichment
No data.
Weaknesses
No weakness.