Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #984 +/- ##
=======================================
Coverage 78.59% 78.60%
=======================================
Files 106 106
Lines 17153 17157 +4
Branches 2043 2044 +1
=======================================
+ Hits 13482 13486 +4
Misses 2422 2422
Partials 1249 1249 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
@pedrobtz I've updated CI to fix the failures. Can you rebase or merge the latest main into your PRs? I'll re-run CI on them and work through them over the next few days. |
A message size near INT32_MAX overflowed decoder->header_size_bytes when the 4- or 8-byte prefix was added to it. Check it before adding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pedrobtz
force-pushed
the
fix-ipc-header-size-overflow
branch
from
October 22, 2026 15:27
955651a to
93d2209
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ArrowIpcDecoderReadHeaderPrefix()adds the 4- or 8-byte prefix to the message size read from the input, and stores the sum in theint32_tdecoder->header_size_bytes. A message size nearINT32_MAXoverflows that sum, which is undefined behaviour. UBSan reports it assigned integer overflow: 8 + 2147483647 cannot be represented in type 'int32_t'. The size is now checked for that overflow before it is added. The negative-size check moves first, so it still runs before the sum.The new
NanoarrowIpcCheckHeaderSizeOverflowtest peeks a header with sizeINT32_MAXafter the continuation marker, and a pre-0.15 header with sizeINT32_MAX - 3. Both now returnEINVAL. Without the fix, the test fails under UBSan at the addition.The input was found by fuzzing the IPC reader in the zuarrow R package, which vendors nanoarrow.
ctestpasses with ASan and UBSan (410 tests). The changed files are formatted with the pinned clang-format 16.0.6.🤖 Generated with Claude Code