Skip to content

Fix integer overflow in FlatBufferBuilder#9145

Open
zwst061106-bot wants to merge 2 commits into
google:masterfrom
zwst061106-bot:zwst061106-bot-patch-1
Open

Fix integer overflow in FlatBufferBuilder#9145
zwst061106-bot wants to merge 2 commits into
google:masterfrom
zwst061106-bot:zwst061106-bot-patch-1

Conversation

@zwst061106-bot

Copy link
Copy Markdown

This PR addresses a critical integer overflow vulnerability in FlatBufferBuilder where multiplication of len * elemsize was performed without validation. I have introduced __builtin_mul_overflow checks to ensure memory allocation safety and prevent heap out-of-bounds writes

This commit addresses an integer overflow vulnerability in FlatBufferBuilder. Previously, the multiplication of len * elemsize was performed without validation, which could lead to heap out-of-bounds writes. I have introduced __builtin_mul_overflow checks in CreateUninitializedVector and StartVectorOfStructs to ensure memory allocation safety.
@google-cla

google-cla Bot commented Jun 19, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions Bot added the c++ label Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant