-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[configgrpc] fix integer overflow in grpc server configuration #10948
Conversation
Change the value of max_recv_msg_size_mib from uint64 to int to avoid a case where misconfiguration caused an integer overflow. Added a Validate function to configgrpc as part of this to validate that users didn't set the value to something that would overflow when converted from megabytes to bytes. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
This bug was uncovered by the linter https://github.com/open-telemetry/opentelemetry-collector/actions/runs/10480357311/job/29027844869?pr=10935 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10948 +/- ##
==========================================
- Coverage 91.89% 91.88% -0.01%
==========================================
Files 411 411
Lines 19311 19319 +8
==========================================
+ Hits 17745 17752 +7
- Misses 1217 1218 +1
Partials 349 349 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Change the value of max_recv_msg_size_mib from uint64 to int to avoid a case where misconfiguration caused an integer overflow. Added a Validate function to configgrpc as part of this to validate that users didn't set the value to something that would overflow when converted from megabytes to bytes.