List, ListView and VarBin arrays do not check offsets in device memory

Offen
#11,795 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
rust
Bereich
data, security

Rechercherichtung

Start with the offsets.is_host() guards in list/array.rs, listview/array.rs and varbin/array.rs, and the comment in list/array.rs about device consumers. Read #11222 to see how the host-side check reads offset values. Done means offsets in device memory are validated before any value read, with tests covering unsorted and out-of-range device offsets. Deciding how to read device memory for the check is the open design question.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Follow-up to #11222.

ListArray, ListViewArray and VarBinArray check their offsets when they are built: the offsets must be sorted, non-negative and within the length of the elements or bytes. #11222 makes ListArray and VarBinArray read the offset values for this check instead of the statistics of the offsets, because statistics can come from an untrusted file. ListViewArray already read the values. All three run the check only when the offsets are in host memory (the offsets.is_host() guards in list/array.rs, listview/array.rs and varbin/array.rs). Offsets in device memory are not checked.

So an array whose offsets are in device memory, for example after vortex-cuda decodes a file on the GPU, can be built with offsets that are not sorted or that point past the end of its elements or bytes. A kernel or an Arrow device export that trusts those offsets can then read out of bounds on the device. A comment in list/array.rs states the gap ("Device consumers must not assume device offsets were checked"), but nothing enforces it, and I have not checked which vortex-cuda paths build these arrays from file data.

Expected: an array with offsets in device memory has its offsets checked before any consumer reads values through them, as host arrays do.

🤖 Generated with Claude Code

Vorherrschende Sprache
Rust
Sterne
3.2k
Forks
239
Ø Merge
1 T. 4 Std.
Gemergte PRs (30 T.)
684

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus vortex-data/vortex

Alle Issues in vortex-data/vortex

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.