Fix integer overflow in FlatBufferBuilder#9145
Conversation
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.
|
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. |
|
Hi @dbaileychess, I have addressed the CLA requirements. I see the CI workflows are now ready and awaiting approval by a maintainer to proceed. This patch addresses the integer overflow vulnerability class by implementing safe multiplication checks across the allocation paths. I am available to address any feedback or performance concerns you might have. Thank you for your time and review |
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