CVE-2026-99789 in Linux
Summary
by MITRE • 11/20/2026
In the Linux kernel, the following vulnerability has been resolved:
block: restore the iterator when rejecting a misaligned bio
bio_iov_iter_get_pages() 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 iterate_iovec() 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.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/20/2026
The Linux kernel block layer contains a critical logic flaw within the bio_iov_iter_get_pages function that leads to out-of-bounds memory access when handling misaligned direct I/O operations. This vulnerability arises from an improper state management of the iterator used for processing input/output vector lists during block device submissions. Specifically, when the system attempts to extract pages from user-space buffers via iovecs, it may successfully process several aligned segments before encountering a segment that is not properly aligned with the underlying storage medium's requirements. Upon detecting this misalignment, the function correctly releases any previously allocated page references and rejects the entire bio request to maintain data integrity and prevent hardware errors. However, in doing so, it fails to revert the iterator back to its original state prior to processing began. This oversight leaves the iterator advanced past the segments that were already processed but subsequently discarded due to the rejection of the overall operation.
This incorrect state persistence has severe consequences for callers utilizing iomap direct I/O mechanisms. When a bio is rejected, these callers often attempt to fall back to buffered I/O as a recovery strategy. To facilitate this fallback, they re-expand the iterator's byte count based on assumptions about its current position. Because the iterator was left advanced rather than reset, the calculated byte count erroneously includes bytes from segments that were already processed and then discarded. Consequently, when the system subsequently invokes iterate_iovec to process these buffers for buffered I/O, it reads beyond the bounds of the originally imported iovec array. This results in an out-of-bounds read condition where kernel memory accesses data outside the allocated buffer boundaries, potentially exposing sensitive information or causing a crash depending on what lies adjacent in memory.
The operational impact of this vulnerability is characterized by potential denial of service and information disclosure. In practical scenarios, such as those demonstrated with writev system calls involving specific segment sizes like ten-byte and one-thousand-fifteen-byte segments, the error manifests as incorrect return values where fewer bytes are reported as written than intended. More critically, kernel debugging tools like KASAN detect an eight-byte read beyond a nine-element iovec allocation. This confirms that the vulnerability allows for unauthorized memory access which could be exploited by local attackers to leak kernel stack or heap data, thereby compromising system confidentiality. The flaw is particularly dangerous because it occurs during standard I/O operations, making it reachable through normal application behavior without requiring complex exploitation techniques beyond triggering misaligned direct I/O requests.
From a technical classification perspective, this issue aligns with CWE-125 Out-of-bounds Read and CWE-367 Time-of-check Time-of-use (TOCTOU) race condition aspects related to state inconsistency during error handling paths. It also relates to improper resource management principles found in CWE-404 Improper Resource Shutdown or Release, as the iterator state is not correctly restored upon failure. In terms of MITRE ATT&CK mapping, this vulnerability facilitates Local Privilege Escalation and Collection via Data from Memory if an attacker can leverage the out-of-bounds read to exfiltrate kernel memory contents. The root cause lies in a lack of atomicity or rollback capability for iterator state changes during partial processing phases within the block layer's bio submission logic.
To mitigate this vulnerability, developers must ensure that the iterator is fully restored to its initial position whenever a bio request is rejected due to alignment issues. This involves saving the original iterator state before attempting page extraction and restoring it if any subsequent segment causes rejection. It is crucial to restore the entire iterator structure rather than merely reverting the byte count, as advancing past empty segments changes positional metadata without consuming bytes, which would still lead to incorrect offsets during fallback operations. Successful bio paths and partially accepted scenarios should remain unchanged to preserve performance characteristics for valid requests. System administrators should apply kernel updates that include this fix immediately to prevent potential exploitation of this memory safety violation in production environments running affected Linux versions.