-
Notifications
You must be signed in to change notification settings - Fork 715
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
kconfig: validate that PutInteger doesn't truncate data #1208
Comments
may I handle this issue? I'll create issue soon! |
@atgane how are you getting on? Feel free to drop into the ebpf-go-dev channel on Slack if you want to discuss this. |
I'm working on a test case, and I will make PR this week! |
@atgane Ping to check if you're still working on this. |
The PR was closed by mistake, is there any more work to be done since the last commit? |
By PR, do you mean #1277? If you want it to be merged, it needs to be reopened, rebased and squashed, and the merge commit removed. :) |
Thank you for your reply. I'll create a PR again |
In #1202 I exported
PutInteger
from the kconfig package. The function has basic validation for booleans, but doesn't check that the value isn't truncated when writing into an integer. We should add bounds checking to make sure we don't write a large value like 0xffff into auint8
for example. Note that this needs to take the signedness of the target integer into account.n
doesn't exceed the bounds of the 1,2 4, 8 byte integer we are writing into.PutInteger
The text was updated successfully, but these errors were encountered: