Bounds-check dictionary indexes in fused CUDA dispatch
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
The unchecked gather is in vortex-cuda/kernels/src/dynamic_dispatch.cu around lines 169-175, and the constructor that accepts unvalidated codes is in vortex-array/src/arrays/dict/array.rs around lines 314-328. Read how the standalone-kernel fix referenced in #10915 handles bounds, then trace the fused DICT path. Done means the fused path rejects an out-of-range code, such as -1 against a two-entry dictionary, before any dictionary read, with a GPU test confirming it.
Written by the indexing model from the issue text.
Description
The fused CUDA DICT operation indexes shared memory without checking codes against the dictionary length. The standalone-kernel fix in #10915 does not cover this call site.
A non-nullable i64 code array [-1] with dictionary values [11i64, 22] passes DictArray::try_new and the fused-plan width checks. The fused gather casts -1 to u32::MAX and indexes the two-entry dictionary, producing an out-of-bounds device read. The fused path should reject an invalid code before accessing dictionary storage.
This defect was already present in release 0.93.0: constructor, unchecked gather. Related: #10914 and #10915.
The counterexample is derived from source review. It has not been executed on a GPU, and the hardware outcome has not been measured.
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 239
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 684
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vortex-data/vortex
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vortex-data/vortex#12633 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
vortex-data/vortex#12628 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vortex-data/vortex#12491 ·
Maintainers usually reply within 1 day
-
Fallible constructor for nested_case_whenPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vortex-data/vortex#11425 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 67/100
vortex-data/vortex#12635 ·
Maintainers usually reply within 1 day
All issues in vortex-data/vortex
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
valkey-io/valkey-glide#7975 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
marklauter/tsong#110 ·
-
docs enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
wasm-bindgen/wasm-bindgen#5503 · 1 comment ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day