-
Notifications
You must be signed in to change notification settings - Fork 2k
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
gnrc/rpl: fix incorrect addition overflow check #19739
Conversation
Checking for overflow of integer addition by comparing against one of the arguments of the addition does not work when the result of the addition is automatically promoted to a larger type. Fix by using an explicit cast to make sure that the result of the addition is not implicitly converted to a larger type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for spotting this
bors merge |
19739: gnrc/rpl: fix incorrect addition overflow check r=maribu a=szsam Co-authored-by: Mingjie Shen <[email protected]>
bors retry |
Already running a review |
That's a lie :-( bors cancel |
Canceled. |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Hi! I’m a student researcher working with @szsam. We have identified this patch as one for a security vulnerability. Will a CVE be issued for this? |
My name is Aravind Machiry, Assistant Professor at Purdue's ECE Department. Thank you for considering this pull request. This pull request was the result of our on-going research work (along with @szsam) to improve the security of open-source embedded projects. In addition to scanning codebases with CodeQL, we are also doing a short (~4 minutes) survey to understand the use of static analysis tools like It would greatly benefit our research if you could fill this anonymous survey: https://purdue.ca1.qualtrics.com/jfe/form/SV_0OnXfr5plPe1QCa Thank you, |
Contribution description
Checking for overflow of integer addition by comparing against one of the arguments of the addition does not work when the result of the addition is automatically promoted to a larger type.
Fix by using an explicit cast to make sure that the result of the addition is not implicitly converted to a larger type.
Testing procedure
make -C examples/gnrc_networking
Issues/PRs references