FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-1217: validate view data offsets in BaseVariableWidthViewVector by Arawoof06 · Pull Request #1218 · apache/arrow-java · GitHub

GH-1217: validate view data offsets in BaseVariableWidthViewVector - #1218

Open
Arawoof06 wants to merge 1 commit into
apache:mainfrom
Arawoof06:view-vector-offset-bounds
Open

GH-1217: validate view data offsets in BaseVariableWidthViewVector#1218
Arawoof06 wants to merge 1 commit into
apache:mainfrom
Arawoof06:view-vector-offset-bounds

Conversation

Copy link
Copy Markdown
Contributor

What's Changed

Utf8View and BinaryView values longer than 12 bytes live in a separate data buffer, with the data-buffer index and offset stored inline in the view; when a vector is read from an IPC stream those fields come from untrusted input. BaseVariableWidthViewVector dereferenced them without checking that the index is present or that offset+length stays inside the data buffer, so a crafted view reads past the buffer (and returns arbitrary native heap when arrow.enable_unsafe_memory_access is set). Routed every out-of-line dereference (get, getDataPointer, hashCode, copyFrom, splitAndTransfer) through one getValidatedDataBuffer check so a bad view is rejected at the source rather than in each caller.

Closes #1217.

This comment has been minimized.

Copy link
Copy Markdown
Contributor Author

Could a maintainer add the bug-fix label? The format check is failing on missing labels and I can't set it myself.

lidavidm added the bug-fix PRs that fix a big. label Aug 25, 2026
github-actions Bot added this to the 20.0.0 milestone Aug 25, 2026
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

Labels

bug-fix PRs that fix a big.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Out-of-bounds read for corrupt view offsets in BaseVariableWidthViewVector

2 participants


Back | FazBrowse Home | New Git URL