-
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
[processor/memory_limiter] Negative limit values are not rejected #9060
Comments
Investigation I was able to confirm setting
This unfortunately puts us in a bit of a bind. The data is still largely unstructured and untyped before the call to decode, so it would be pretty complicated to add validation before decoding. However, once data is decoded it's impossible to know if the value was originally a large uint value, or just negative. We could possibly disable Impact
Contrib:
I'm not sure the impact of this bug justifies changing |
A potential workaround is to simply move all configuration uint values to |
We have a few decode hooks opentelemetry-collector/confmap/confmap.go Line 153 in 44fbb84
|
Thanks for calling that out, that's a much better way to handle this. I missed that in my review. |
**Description:** This adds a decode hook for unmarshalling negative integers into uint types. This will now return an error instead of converting negative values into large uint values. **Link to tracking Issue:** <Issue number if applicable> Fixes #9060 **Testing:** Added unit tests for confmap functionality, functional tests in memory limiter processor (the original component this issue was filed against)
Describe the bug
Negative limit values in the configuration are accepted and converted into
0xffffffff - val
Steps to reproduce
Use config
What did you expect to see?
Collector refuse to start with an error message.
What did you see instead?
Collector is started with huge limits
What version did you use?
Version:
v0.91.1
The text was updated successfully, but these errors were encountered: