{"id":"CVE-2026-99789","summary":"block: restore the iterator when rejecting a misaligned bio","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nblock: restore the iterator when rejecting a misaligned bio\n\nbio_iov_iter_get_pages() can extract some iovecs before encountering a\nmisaligned one.  It releases the pages and rejects the entire bio, but\nleaves the supplied iterator advanced.\n\nAn iomap direct-I/O caller may subsequently reexpand the iterator's\nbyte count and fall back to buffered I/O.  The reexpanded count then\nincludes bytes before the iterator's current segment, potentially\ncausing iterate_iovec() to read beyond the imported iovec array.\n\nIn a reproducer using an initial empty iovec followed by 10-byte and\n1015-byte segments, writev() returned 1015 instead of 1025 and KASAN\nreported an 8-byte read beyond the nine-element iovec allocation.\nSaving and restoring the iterator on the rejected-bio path makes\nwritev() return 1025 and eliminates the KASAN report.\n\nRestore the entire iterator rather than reverting a byte count:\nadvancing past an empty segment changes its position without consuming\nany bytes.\n\nLeave successful and partially accepted bio paths unchanged.","modified":"2026-11-20T21:02:33.460557372Z","published":"2026-11-20T05:51:50.097Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99789.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/3a6381f254ed81d36f3896f61dcd5d830e08861d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/40d070cbb1906896d6fd65c39722d2411830ed9f"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99789.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99789"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"14b007e178811db72fbb1ebb3535160db6ec1e6a"},{"fixed":"3a6381f254ed81d36f3896f61dcd5d830e08861d"},{"fixed":"40d070cbb1906896d6fd65c39722d2411830ed9f"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"d44a97a3b1c00cc571245124e23e5ceb0a0225a0"}]}],"versions":["v7.2.15","v7.2.14","v7.2.13","v7.2.12","v7.2.11","v7.2.10","v7.2.9","v7.2.8","v7.2.7","v7.2.6","v7.2.5","v7.2.4"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-99789.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.2.4"},{"fixed":"7.3"}]},{"type":"ECOSYSTEM","events":[{"introduced":"7.3.0"},{"fixed":"7.3.5"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-99789.json"}}],"schema_version":"1.9.2"}