Skip to content

Conversation

@pitrou
Copy link
Member

@pitrou pitrou commented Jan 19, 2026

Rationale for this change

An incorrect variadic buffer count could easily blow up memory when reserving a vector of Buffers, even though the RecordBatch has a lot less buffers available.

Reported by OSS-Fuzz at https://issues.oss-fuzz.com/issues/476180608, and separately by Silas Boch.

What changes are included in this PR?

Pre-validate the variadic buffer count read from the IPC RecordBatch table. Initial patch by Silas Boch.

Are these changes tested?

Yes, by additional fuzz regression file.

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.)

@pitrou pitrou force-pushed the check_variadic_buffer_count branch from e3d44d5 to 45e4584 Compare January 19, 2026 15:18
@pitrou pitrou requested a review from bkietz January 19, 2026 15:22
@pitrou
Copy link
Member Author

pitrou commented Jan 19, 2026

@github-actions crossbow submit -g cpp

@github-actions

This comment was marked as off-topic.

@pitrou
Copy link
Member Author

pitrou commented Jan 19, 2026

The failure on the ASAN CI job is because #48859 needs to be merged.

@pitrou pitrou added the Critical Fix Bugfixes for security vulnerabilities, crashes, or invalid data. label Jan 19, 2026
@pitrou pitrou requested review from WillAyd and zanmato1984 January 19, 2026 16:17
@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Jan 20, 2026
@pitrou pitrou force-pushed the check_variadic_buffer_count branch from 45e4584 to 76d9280 Compare January 20, 2026 14:59
@pitrou
Copy link
Member Author

pitrou commented Jan 20, 2026

@github-actions crossbow submit -g cpp

@github-actions

This comment was marked as outdated.

@pitrou pitrou force-pushed the check_variadic_buffer_count branch from 76d9280 to a600573 Compare January 21, 2026 08:22
@pitrou
Copy link
Member Author

pitrou commented Jan 21, 2026

@github-actions crossbow submit -g cpp

@pitrou
Copy link
Member Author

pitrou commented Jan 21, 2026

Rebased, I'll merge if CI is green. Thanks for the review @WillAyd !

@github-actions
Copy link

Revision: a600573

Submitted crossbow builds: ursacomputing/crossbow @ actions-23dc77869a

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-debian-experimental-cpp-gcc-15 GitHub Actions
test-fedora-42-cpp GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-bundled GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-bundled-offline GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions
test-ubuntu-24.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions

@pitrou pitrou merged commit 421a475 into apache:main Jan 21, 2026
51 checks passed
@pitrou pitrou removed the awaiting committer review Awaiting committer review label Jan 21, 2026
@pitrou pitrou deleted the check_variadic_buffer_count branch January 21, 2026 09:17
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 421a475.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them.

raulcd pushed a commit that referenced this pull request Feb 3, 2026
…unt in IPC (#48901)

### Rationale for this change

An incorrect variadic buffer count could easily blow up memory when reserving a vector of Buffers, even though the RecordBatch has a lot less buffers available.

Reported by OSS-Fuzz at https://issues.oss-fuzz.com/issues/476180608, and separately by Silas Boch.

### What changes are included in this PR?

Pre-validate the variadic buffer count read from the IPC RecordBatch table. Initial patch by Silas Boch.

### Are these changes tested?

Yes, by additional fuzz regression file.

### 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.)

* GitHub Issue: #48900

Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: C++ Critical Fix Bugfixes for security vulnerabilities, crashes, or invalid data.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants