You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "bit2swaz (via GitHub)" <gi...@apache.org> on 2026/08/18 20:47:58 UTC
[PR] fix(arrow-ipc): return an error instead of panicking on IPC file with no footer schema [arrow-rs]
bit2swaz opened a new pull request, #10744:
URL: https://github.com/apache/arrow-rs/pull/10744
# Which issue does this PR close?
- Closes #10663
# Rationale for this change
`FileReaderBuilder::build` read the footer's schema with [`footer.schema().unwrap()`](https://github.com/bit2swaz/arrow-rs/blob/93180c87b97fe0b19cd4b84fdef6839230a01400/arrow-ipc/src/reader.rs#L1253). the schema table is optional in the footer flatbuffer, so an IPC file whose footer verifies but has no schema table makes that `unwrap()` panic instead of returning an error. the flatbuffer verifier accepts such a file, so this is reachable from untrusted input
this is the same class of untrusted-input panic as #10437 and #10575. those two are in `convert.rs` and #10647 made them fallible, but this sink is one level up in `reader.rs` where the footer's schema table is absent, so #10647 leaves it alone
# What changes are included in this PR?
swap the `unwrap()` for `ok_or_else(...)?` returning an `ArrowError::ParseError`, matching the `recordBatches` check right above it
# Are these changes tested?
yes. added `test_missing_footer_schema_error` which builds a footer that verifies but has no schema table and checks `FileReader::try_new` returns `Err` instead of panicking
# Are there any user-facing changes?
reading a malformed IPC file with no footer schema now returns an `ArrowError` instead of panicking. no API changes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(arrow-ipc): return an error instead of panicking on IPC file with no footer schema [arrow-rs]
Posted by "bit2swaz (via GitHub)" <gi...@apache.org>.
bit2swaz commented on PR #10744:
URL: https://github.com/apache/arrow-rs/pull/10744#issuecomment-5334257507
the failing Clippy check here isnt from this PR. its the new `clippy::return_and_then` lint from Rust 1.97 firing on [statistics.rs#L1841](https://github.com/apache/arrow-rs/blob/cb20cc4bfd0fd29bf31d4c4c5c783174d9fcbff6/parquet/src/arrow/arrow_reader/statistics.rs#L1841), which landed in #10652. this branch is rebased onto that commit so it picks it up, but the code is in `parquet` and untouched by this change
@/alamb already has a fix up in #10743. once that merges this check should go green on the next run, so theres nothing to do here :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(arrow-ipc): return an error instead of panicking on IPC file with no footer schema [arrow-rs]
Posted by "Rich-T-kid (via GitHub)" <gi...@apache.org>.
Rich-T-kid commented on PR #10744:
URL: https://github.com/apache/arrow-rs/pull/10744#issuecomment-5334298662
> the failing Clippy check here isnt from this PR. its the new `clippy::return_and_then` lint from Rust 1.97 firing on [statistics.rs#L1841](https://github.com/apache/arrow-rs/blob/cb20cc4bfd0fd29bf31d4c4c5c783174d9fcbff6/parquet/src/arrow/arrow_reader/statistics.rs#L1841), which landed in #10652. this branch is rebased onto that commit so it picks it up, but the code is in `parquet` and untouched by this change
>
> @/alamb already has a fix up in #10743. once that merges this check should go green on the next run, so theres nothing to do here :)
ah okay makes sense 👍
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(arrow-ipc): return an error instead of panicking on IPC file with no footer schema [arrow-rs]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #10744:
URL: https://github.com/apache/arrow-rs/pull/10744#issuecomment-5336021962
thanks @bit2swaz, @Rich-T-kid & @alamb
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(arrow-ipc): return an error instead of panicking on IPC file with no footer schema [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #10744:
URL: https://github.com/apache/arrow-rs/pull/10744#issuecomment-5334502820
Merging up to pick up audit and clippy fixes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(arrow-ipc): return an error instead of panicking on IPC file with no footer schema [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #10744:
URL: https://github.com/apache/arrow-rs/pull/10744#issuecomment-5334472763
> the failing Clippy check here isnt from this PR. its the new `clippy::return_and_then` lint from Rust 1.97 firing on [statistics.rs#L1841](https://github.com/apache/arrow-rs/blob/cb20cc4bfd0fd29bf31d4c4c5c783174d9fcbff6/parquet/src/arrow/arrow_reader/statistics.rs#L1841), which landed in #10652. this branch is rebased onto that commit so it picks it up, but the code is in `parquet` and untouched by this change
>
> @/alamb already has a fix up in #10743. once that merges this check should go green on the next run, so theres nothing to do here :)
You can also cherry-pick the fix to this PR and I would be happy to merge it :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(arrow-ipc): return an error instead of panicking on IPC file with no footer schema [arrow-rs]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey merged PR #10744:
URL: https://github.com/apache/arrow-rs/pull/10744
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org