You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2025/11/17 10:03:49 UTC
[PR] GH-48146: [C++][Parquet] Fix undefined behavior with invalid column/offset index [arrow]
pitrou opened a new pull request, #48147:
URL: https://github.com/apache/arrow/pull/48147
### Rationale for this change
This should fix the following issues found by OSS-Fuzz:
* https://issues.oss-fuzz.com/issues/461058054
* https://issues.oss-fuzz.com/issues/461058060
### Are these changes tested?
Yes, by existing tests and additional fuzz regression files:
**TODO: update testing submodule once https://github.com/apache/arrow-testing/pull/120 is merged**
### Are there any user-facing changes?
No.
**This PR contains a "Critical Fix".** (If the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld), please provide explanation. If not, you can remove this.)
--
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] GH-48146: [C++][Parquet] Fix undefined behavior with invalid column/offset index [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #48147:
URL: https://github.com/apache/arrow/pull/48147#issuecomment-3558331562
Revision: f14baec2ad60c7b0ff533fb53d3c184729318b32
Submitted crossbow builds: [ursacomputing/crossbow @ actions-b1390bd016](https://github.com/ursacomputing/crossbow/branches/all?query=actions-b1390bd016)
|Task|Status|
|----|------|
|example-cpp-minimal-build-static|[](https://github.com/ursacomputing/crossbow/actions/runs/19540085954/job/55943813124)|
|example-cpp-minimal-build-static-system-dependency|[](https://github.com/ursacomputing/crossbow/actions/runs/19540086524/job/55943815115)|
|example-cpp-tutorial|[](https://github.com/ursacomputing/crossbow/actions/runs/19540086117/job/55943813908)|
|test-build-cpp-fuzz|[](https://github.com/ursacomputing/crossbow/actions/runs/19540085919/job/55943813017)|
|test-conda-cpp|[](https://github.com/ursacomputing/crossbow/actions/runs/19540085847/job/55943813109)|
|test-conda-cpp-valgrind|[](https://github.com/ursacomputing/crossbow/actions/runs/19540086460/job/55943815217)|
|test-cuda-cpp-ubuntu-22.04-cuda-11.7.1|[](https://github.com/ursacomputing/crossbow/actions/runs/19540086128/job/55943814272)|
|test-debian-12-cpp-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/19540085766/job/55943812521)|
|test-debian-12-cpp-i386|[](https://github.com/ursacomputing/crossbow/actions/runs/19540086716/job/55943815876)|
|test-fedora-42-cpp|[](https://github.com/ursacomputing/crossbow/actions/runs/19540085763/job/55943812617)|
|test-ubuntu-22.04-cpp|[](https://github.com/ursacomputing/crossbow/actions/runs/19540085843/job/55943812662)|
|test-ubuntu-22.04-cpp-20|[](https://github.com/ursacomputing/crossbow/actions/runs/19540086114/job/55943813826)|
|test-ubuntu-22.04-cpp-bundled|[](https://github.com/ursacomputing/crossbow/actions/runs/19540087078/job/55943817276)|
|test-ubuntu-22.04-cpp-emscripten|[](https://github.com/ursacomputing/crossbow/actions/runs/19540086314/job/55943814381)|
|test-ubuntu-22.04-cpp-no-threading|[](https://github.com/ursacomputing/crossbow/actions/runs/19540085818/job/55943812691)|
|test-ubuntu-24.04-cpp|[](https://github.com/ursacomputing/crossbow/actions/runs/19540086006/job/55943813229)|
|test-ubuntu-24.04-cpp-bundled-offline|[](https://github.com/ursacomputing/crossbow/actions/runs/19540085671/job/55943812600)|
|test-ubuntu-24.04-cpp-gcc-13-bundled|[](https://github.com/ursacomputing/crossbow/actions/runs/19540085714/job/55943812634)|
|test-ubuntu-24.04-cpp-gcc-14|[](https://github.com/ursacomputing/crossbow/actions/runs/19540086214/job/55943814216)|
|test-ubuntu-24.04-cpp-minimal-with-formats|[](https://github.com/ursacomputing/crossbow/actions/runs/19540086589/job/55943815349)|
|test-ubuntu-24.04-cpp-thread-sanitizer|[](https://github.com/ursacomputing/crossbow/actions/runs/19540086283/job/55943814239)|
--
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] GH-48146: [C++][Parquet] Fix undefined behavior with invalid column/offset index [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #48147:
URL: https://github.com/apache/arrow/pull/48147#issuecomment-3558320594
@github-actions crossbow submit -g cpp
--
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] GH-48146: [C++][Parquet] Fix undefined behavior with invalid column/offset index [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou merged PR #48147:
URL: https://github.com/apache/arrow/pull/48147
--
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] GH-48146: [C++][Parquet] Fix undefined behavior with invalid column/offset index [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #48147:
URL: https://github.com/apache/arrow/pull/48147#issuecomment-3541177253
@github-actions crossbow submit -g cpp
--
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] GH-48146: [C++][Parquet] Fix undefined behavior with invalid column/offset index [arrow]
Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #48147:
URL: https://github.com/apache/arrow/pull/48147#discussion_r2540326167
##########
cpp/src/parquet/page_index.cc:
##########
@@ -346,7 +346,15 @@ class RowGroupPageIndexReaderImpl : public RowGroupPageIndexReader {
}
}
- private:
+ std::shared_ptr<Buffer> ReadIndexBuffer(int64_t offset, int64_t length,
+ const char* offset_kind) {
+ PARQUET_ASSIGN_OR_THROW(auto buffer, input_->ReadAt(offset, length));
+ if (buffer->size() < length) {
+ throw ParquetException("Invalid or truncated ", offset_kind);
Review Comment:
nit: include buffer->size() and length in the error message
--
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] GH-48146: [C++][Parquet] Fix undefined behavior with invalid column/offset index [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #48147:
URL: https://github.com/apache/arrow/pull/48147#issuecomment-3560284217
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 83a5a61970a70d5b8fd0913341b3331be141da56.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/55988661811) has more details.
--
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] GH-48146: [C++][Parquet] Fix undefined behavior with invalid column/offset index [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #48147:
URL: https://github.com/apache/arrow/pull/48147#issuecomment-3541188281
Revision: fa1a4741d9aae3edd43612d55bb8e65cd256a292
Submitted crossbow builds: [ursacomputing/crossbow @ actions-d973bf3ab4](https://github.com/ursacomputing/crossbow/branches/all?query=actions-d973bf3ab4)
|Task|Status|
|----|------|
|example-cpp-minimal-build-static|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274399/job/55577621662)|
|example-cpp-minimal-build-static-system-dependency|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274463/job/55577622455)|
|example-cpp-tutorial|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274907/job/55577623417)|
|test-build-cpp-fuzz|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274332/job/55577621615)|
|test-conda-cpp|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274071/job/55577620734)|
|test-conda-cpp-valgrind|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274721/job/55577622713)|
|test-cuda-cpp-ubuntu-22.04-cuda-11.7.1|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274468/job/55577621986)|
|test-debian-12-cpp-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274552/job/55577622244)|
|test-debian-12-cpp-i386|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274457/job/55577621805)|
|test-fedora-42-cpp|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274005/job/55577621389)|
|test-ubuntu-22.04-cpp|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274653/job/55577622675)|
|test-ubuntu-22.04-cpp-20|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274032/job/55577620754)|
|test-ubuntu-22.04-cpp-bundled|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274044/job/55577620770)|
|test-ubuntu-22.04-cpp-emscripten|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274540/job/55577622120)|
|test-ubuntu-22.04-cpp-no-threading|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274454/job/55577622442)|
|test-ubuntu-24.04-cpp|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274211/job/55577621329)|
|test-ubuntu-24.04-cpp-bundled-offline|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274381/job/55577621710)|
|test-ubuntu-24.04-cpp-gcc-13-bundled|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274736/job/55577622783)|
|test-ubuntu-24.04-cpp-gcc-14|[](https://github.com/ursacomputing/crossbow/actions/runs/19427273933/job/55577620504)|
|test-ubuntu-24.04-cpp-minimal-with-formats|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274598/job/55577622319)|
|test-ubuntu-24.04-cpp-thread-sanitizer|[](https://github.com/ursacomputing/crossbow/actions/runs/19427274235/job/55577621310)|
--
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