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

Ouverte
#27,327 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@rxdrccq y travaille déjà.

Depuis le 11/11/2026.

  • #27348 par @rxdrccq — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
58/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
rust
Domaine
backend, databases

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Rust
Étoiles
9.6k
Forks
2.6k
Merge moyen
3 j 4 h
PR mergées (30 j)
345

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de apache/datafusion

Toutes les issues de apache/datafusion

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.