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

Đang mở
#27,327 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@rxdrccq đang làm issue này rồi.

Từ ngày 11/11/2026.

  • #27348 của @rxdrccq — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
backend, databases

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
9.6k
Fork
2.6k
Merge trung bình
3 ngày 4 giờ
Pull request đã merge (30 ngày)
345

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/datafusion

Tất cả issue của apache/datafusion

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.