CVE-2026-99789: block: restore the iterator when rejecting a misaligned bio

Published Nov 20, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

block: restore the iterator when rejecting a misaligned bio

bioiovitergetpages() can extract some iovecs before encountering a misaligned one. It releases the pages and rejects the entire bio, but leaves the supplied iterator advanced.

An iomap direct-I/O caller may subsequently reexpand the iterator's byte count and fall back to buffered I/O. The reexpanded count then includes bytes before the iterator's current segment, potentially causing iterateiovec() to read beyond the imported iovec array.

In a reproducer using an initial empty iovec followed by 10-byte and 1015-byte segments, writev() returned 1015 instead of 1025 and KASAN reported an 8-byte read beyond the nine-element iovec allocation. Saving and restoring the iterator on the rejected-bio path makes writev() return 1025 and eliminates the KASAN report.

Restore the entire iterator rather than reverting a byte count: advancing past an empty segment changes its position without consuming any bytes.

Leave successful and partially accepted bio paths unchanged.

Affected Software

2 affected componentsFixes available
linux/kernel>=7.2.4<7.3
7.3
linux/kernel>=7.3.0<7.3.5
7.3.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.5
  3. Compensating control

    In the Linux kernel, restore the entire iterator on the rejected-misaligned-bio path before falling back to buffered I/O; leave successful and partially accepted bio paths unchanged.

Frequently Asked Questions

1

What conditions are needed to trigger the issue?

The affected path involves iomap direct I/O when bio_iov_iter_get_pages() processes an iovec sequence containing a misaligned segment after it has already extracted earlier segments. The described reproducer also includes an initial empty iovec, followed by 10-byte and 1015-byte segments.

2

What happens when the flawed path is reached?

The rejected bio releases its pages but leaves the caller-supplied iterator advanced. If the direct-I/O caller reexpands the byte count and falls back to buffered I/O, iterate_iovec() can read beyond the imported iovec array; the reproducer produced an 8-byte out-of-bounds read reported by KASAN.

3

How does the fix prevent the out-of-bounds read?

The fix saves and restores the entire iterator when a misaligned bio is rejected. Restoring the complete iterator is necessary because passing an empty segment can change iterator position without consuming bytes; successful and partially accepted bio paths are unchanged.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203