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

Abierto
#27,327 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@rxdrccq ya está trabajando en esto.

Desde el 11/11/2026.

  • #27348 de @rxdrccq — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
58/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
9.6k
Forks
2.6k
Merge medio
3 d 4 h
PR fusionados (30 d)
345

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/datafusion

Todos los issues de apache/datafusion

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.