Skip to content

Defensively cap number_of_leading_zeros in getNationalSignificantNumber#4010

Open
ghaithabdulreda wants to merge 1 commit into
google:masterfrom
ghaithabdulreda:fix/oom-leading-zeros-cap
Open

Defensively cap number_of_leading_zeros in getNationalSignificantNumber#4010
ghaithabdulreda wants to merge 1 commit into
google:masterfrom
ghaithabdulreda:fix/oom-leading-zeros-cap

Conversation

@ghaithabdulreda

Copy link
Copy Markdown

Cap the number_of_leading_zeros field at 3 in getNationalSignificantNumber()
for both Java and C++ to prevent Out-of-Memory DoS via malicious protobuf
input. The field has no upper bound in the protobuf definition and is used
directly for array allocation.

Bug: https://issuetracker.google.com/issues/523402884

@ghaithabdulreda ghaithabdulreda requested a review from a team as a code owner June 12, 2026 23:25
@google-cla

google-cla Bot commented Jun 12, 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.

@ghaithabdulreda

Copy link
Copy Markdown
Author

@google-cla check

@ghaithabdulreda ghaithabdulreda force-pushed the fix/oom-leading-zeros-cap branch from fd72c05 to 4cd9c37 Compare June 12, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant