[ABA-16] test: repro for null-index raw payload leaking through 4 take kernels#12
Open
abnobdoss wants to merge 1 commit into
Open
[ABA-16] test: repro for null-index raw payload leaking through 4 take kernels#12abnobdoss wants to merge 1 commit into
abnobdoss wants to merge 1 commit into
Conversation
… take kernels Add one #[ignore]'d failing test per kernel that demonstrates the bug: each kernel consults the raw integer payload of a null index before honoring validity, causing panics or errors on out-of-bounds raw values. Affected kernels: - vortex-array: primitive take (OOB slice index) - vortex-fastlanes: bitpacked take (OOB chunk-index slice) - vortex-array: Patches::take_map (usize::try_from before is_null) - vortex-runend: RunEnd take (OutOfBounds bail before validity) No fix is included; this is a REPRO-ONLY commit pending cross-crate decision on how to canonicalize null payloads in take kernels. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Abanoub Doss <abanoub.doss@gmail.com>
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.
Summary
#[ignore]'d failing test per affected kernel demonstrating that take kernels consult the raw integer payload of a null index before honoring validityLinear
ABA-16: https://linear.app/abanoubdoss/issue/ABA-16
Affected kernels
vortex-array/src/arrays/primitive/compute/take/mod.rs— scalar loop callsbuffer[idx.as_()]unconditionally; an OOB raw value in a null slot causes a Rust slice panicencodings/fastlanes/src/bitpacking/compute/take.rs—chunked_indicesiterator feeds every raw index value (including null garbage) into the chunk-lookup path, causing a slice OOB on large raw valuesvortex-array/src/patches.rs—take_mapcallsusize::try_from(take_idx)at the top of its loop, before theis_nullcheck; a null index with raw valuei64::MINreturnsErr("Failed to convert index to usize")encodings/runend/src/compute/take.rs— bounds check (vortex_bail!(OutOfBounds)) runs before validity is consulted; a null index with an OOB raw value errors out before the null can be honouredOpen question
Should each kernel zero-initialize null slots independently, or should there be a shared canonical null-payload helper in
vortex-arraythat all take kernels call before consulting the raw index buffer? The latter would be easier to audit and test uniformly but requires a cross-crate refactor.🤖 Generated with Claude Code