Skip to content

[ABA-16] test: repro for null-index raw payload leaking through 4 take kernels#12

Open
abnobdoss wants to merge 1 commit into
developfrom
fix/aba-16-take-null-index-payload
Open

[ABA-16] test: repro for null-index raw payload leaking through 4 take kernels#12
abnobdoss wants to merge 1 commit into
developfrom
fix/aba-16-take-null-index-payload

Conversation

@abnobdoss
Copy link
Copy Markdown
Owner

Summary

  • Adds one #[ignore]'d failing test per affected kernel demonstrating that take kernels consult the raw integer payload of a null index before honoring validity
  • No fix is included — this is a REPRO-ONLY PR pending cross-crate decision on how to canonicalize null payloads in take kernels
  • All 4 tests were verified to fail when un-ignored and to be skipped (ignored) in normal CI runs

Linear

ABA-16: https://linear.app/abanoubdoss/issue/ABA-16

Affected kernels

  • vortex-array/src/arrays/primitive/compute/take/mod.rs — scalar loop calls buffer[idx.as_()] unconditionally; an OOB raw value in a null slot causes a Rust slice panic
  • encodings/fastlanes/src/bitpacking/compute/take.rschunked_indices iterator feeds every raw index value (including null garbage) into the chunk-lookup path, causing a slice OOB on large raw values
  • vortex-array/src/patches.rstake_map calls usize::try_from(take_idx) at the top of its loop, before the is_null check; a null index with raw value i64::MIN returns Err("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 honoured

Open question

Should each kernel zero-initialize null slots independently, or should there be a shared canonical null-payload helper in vortex-array that 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

… 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant