{"id":"CVE-2026-138977","aliases":["CVE-2026-138977"],"related":[],"kind":"vulnerability","state":"published","title":"fuse: don't shorten the folio descriptor at LLONG_MAX","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nfuse: don't shorten the folio descriptor at LLONG_MAX\n\nfuse_send_readpages() and fuse_do_readfolio() both decrement the folio\ndescriptor length when handling the overflow case where a read would\nexceed LLONG_MAX after incrementing the file position by the number of\nbytes that need to be read in.\n\nShortening it is unnecessary (and for the virtio-fs paths, a bug), and\nwith fuse using iomap for handling reads, shortening it is buggy.\n\nFor fuse_send_readpages(), ap->descs[] is also what fuse_readpages_end()\nreports back to iomap_finish_folio_read(). iomap accounted the full\nlength when the range was submitted, so the lengths reported on\ncompletion have to add up to what was submitted. Reporting one byte less\nleaves ifs->read_bytes_pending nonzero, folio_end_read() is never called,\nand the folio stays locked.\n\nThis is currently reachable on fuseblk mounts configured with block\nsizes smaller than the page size.\n\nFix this by leaving the descriptor length untouched. The reply will then\nbe one byte shorter than what the descriptor lengths add up to, and the\nlast byte will be zeroed in fuse_copy_folios().\n\nThis also fixes a bug in virtio-fs that existed before any iomap changes\nwere added to fuse. For virtio-fs, data there arrives by DMA rather than\nthrough fuse_copy_folios(), so the only zeroing is in\nvirtio_fs_request_complete(), which compares the reply size against the\ndescriptor length. With the descriptor length shortened, the two are\nequal and nothing gets zeroed, which means the unrequested byte is left\nholding whatever was in the folio, when the folio is marked uptodate.\nThis is both in the fuse_do_readfolio() and fuse_send_readpages() paths.\nThis dates back to commit 2f1398291bf3 (\"fuse: don't overflow LLONG_MAX\nwith end offset\").","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nfuse: don't shorten the folio descriptor at LLONG_MAX\n\nfuse_send_readpages() and fuse_do_readfolio() both decrement the folio\ndescriptor length when handling the overflow case where a read would\nexceed LLONG_MAX after incrementing the file position by the number of\nbytes that need to be read in.\n\nShortening it is unnecessary (and for the virtio-fs paths, a bug), and\nwith fuse using iomap for handling reads, shortening it is buggy.\n\nFor fuse_send_readpages(), ap->descs[] is also what fuse_readpages_end()\nreports back to iomap_finish_folio_read(). iomap accounted the full\nlength when the range was submitted, so the lengths reported on\ncompletion have to add up to what was submitted. Reporting one byte less\nleaves ifs->read_bytes_pending nonzero, folio_end_read() is never called,\nand the folio stays locked.\n\nThis is currently reachable on fuseblk mounts configured with block\nsizes smaller than the page size.\n\nFix this by leaving the descriptor length untouched. The reply will then\nbe one byte shorter than what the descriptor lengths add up to, and the\nlast byte will be zeroed in fuse_copy_folios().\n\nThis also fixes a bug in virtio-fs that existed before any iomap changes\nwere added to fuse. For virtio-fs, data there arrives by DMA rather than\nthrough fuse_copy_folios(), so the only zeroing is in\nvirtio_fs_request_complete(), which compares the reply size against the\ndescriptor length. With the descriptor length shortened, the two are\nequal and nothing gets zeroed, which means the unrequested byte is left\nholding whatever was in the folio, when the folio is marked uptodate.\nThis is both in the fuse_do_readfolio() and fuse_send_readpages() paths.\nThis dates back to commit 2f1398291bf3 (\"fuse: don't overflow LLONG_MAX\nwith end offset\").","source":"cvelist"}],"published":"2026-11-30T13:26:44.252Z","modified":"2026-11-30T14:17:59.840Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"4ea907108a5ca800e91708f0dbbe01bc95f8f5af","fixed":"5b3da0a784f8f515c75a534b5878b563a57a1eb0","status":"affected"},{"type":"git","introduced":"4ea907108a5ca800e91708f0dbbe01bc95f8f5af","fixed":"4c72635f913850512d5fa74bf3eb7db3670398cf","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.19","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/5b3da0a784f8f515c75a534b5878b563a57a1eb0","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4c72635f913850512d5fa74bf3eb7db3670398cf","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-138977","url":"https://www.cve.org/CVERecord?id=CVE-2026-138977","licence":"CVE Terms of Use","modified":"2026-11-30T13:26:44.252Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-138977","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138977","licence":"Public domain","modified":"2026-11-30T14:17:59.840Z"}],"updatedAt":"2026-11-30T14:32:38.450Z","epss":{"score":0.00198,"percentile":0.09981,"date":"2026-12-01T12:00:22.000Z"}}