Skip to content

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

@Arawoof06

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.

@github-actions

This comment has been minimized.

@Arawoof06

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 lidavidm added the bug-fix PRs that fix a big. label Aug 25, 2026
@github-actions github-actions Bot added this to the 20.0.0 milestone Aug 25, 2026
注册 for free to join this conversation on GitHub. Already have an account? 登录 to comment

标签

bug-fix PRs that fix a big.

项目

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants