Parquet protobuf decoder panics on an out-of-bounds projection index

Offen
#27,327 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@rxdrccq arbeitet bereits daran.

Seit 11.11.2026.

  • #27348 von @rxdrccq — offen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
58/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
rust
Bereich
backend, databases

Rechercherichtung

Start in datafusion/datasource-parquet/src/source.rs at ParquetSource::try_from_proto, especially the projection lookup around the linked upstream revision. Trace how an invalid projection index can be turned into an error before schema.field panics, and check the datasource decoder’s existing tests. Done means decoding the supplied eight-byte plan returns an error; the issue notes that direct constructor callers should also be covered.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Describe the bug

ParquetSource::try_from_proto uses each legacy projection index with schema.field(i as usize) while it builds the predicate schema. An index outside the schema panics before the constructor can return an error. A predicate is not required.

Reproduce

The serialized PhysicalPlanNode is eight bytes:

hex:    0a060a041200200a
base64: CgYKBBIAIAo=

It describes a Parquet scan with an empty schema and projection [10]. Decoding it with DataFusion 55.1.0 panics in Arrow with index out of bounds: the len is 0 but the index is 10.

A downstream worker regression reproduces that panic against the original decoder and passes with a bounds check: https://github.com/telekom/sutura/actions/runs/43001290751/job/130459222254

The unchanged input and downstream fix are in https://github.com/telekom/sutura/pull/1878. The original release-fuzz failure is https://github.com/telekom/sutura/actions/runs/42981741003/job/130393510786.

Expected behavior

Return an error for an invalid projection index. A decoder returning Result should not panic on this input.

Additional context

Upstream main still contains the unchecked lookup at this exact revision. This is a source inspection; I have not run the input against upstream main.

The downstream check is at the existing datafusion-proto boundary. It does not fix direct calls to the datasource constructor or other malformed plan fields. An upstream check in the datasource decoder would cover its direct callers too.

AI assistance was used to investigate and draft this report.

Vorherrschende Sprache
Rust
Sterne
9.6k
Forks
2.6k
Ø Merge
3 T. 4 Std.
Gemergte PRs (30 T.)
345

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

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 apache/datafusion

Alle Issues in apache/datafusion

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

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