Conversation
The following correctness bugs fixed with unit test coverage: - sendfile: loop writes until all read bytes are drained to destination, guard zero-progress (wr==0) with EIO, track partial writes via goto - ELF PT_INTERP: reject (return -1) instead of truncating when segment overflows buf_len, NUL terminator is missing, path exceeds output buffer, or interpreter string is empty - I/O pointer arithmetic: add __builtin_add_overflow guards on all 10 sites across read, pread, write, pwrite, sendfile, readv/writev, and shadow-read paths to prevent guest-controlled address wrap - procmem: split process_vm_readv n<=0 into n<0 (-errno) and n==0 (-EFAULT) to eliminate stale errno; guard remote_addr+total overflow Change-Id: Iac51bf55d02e02e6b0eb4b35ecf5c22b989d5234
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The following correctness bugs fixed with unit test coverage:
Change-Id: Iac51bf55d02e02e6b0eb4b35ecf5c22b989d5234
Summary by cubic
Fixes multiple correctness bugs in I/O and ELF parsing with overflow guards and stricter errors to prevent address wrap, silent truncation, and stale errno. Expands tests for sendfile, PT_INTERP, and procmem to lock in behavior.
Written for commit 0000256. Summary will update on new commits.