-
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
dcerpc: prevent integer underflow #12528
base: master
Are you sure you want to change the base?
Conversation
in case a fragment has a length lesser than DCERPC_HDR_LEN Fixes: 9daf852 ("dcerpc: tidy up code")
rust/src/dcerpc/dcerpc.rs
Outdated
if cur_i.len() < (fraglen - frag_bytes_consumed) as usize { | ||
if (cur_i.len() + frag_bytes_consumed as usize) < fraglen as usize { |
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.
This does appear to restore correct behavior.
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.
@inashivb what do you think of the behavior when fraglen < 16 ?
I think we should set an event
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.
@inashivb what do you think of the behavior when fraglen < 16 ?
I think we should set an event
Agreed.
For commit |
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.
Looks like a CI error with an SCLogDebug.
ERROR: ERROR: QA failed on ASAN_TLPR1_suri. Pipeline 24561 |
I guess we need one or more tickets, but wanted Shivani's opinion first ;-) |
TODOs :
Header handling was wrong in the case
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12528 +/- ##
=======================================
Coverage 80.68% 80.69%
=======================================
Files 925 925
Lines 258914 258858 -56
=======================================
- Hits 208914 208880 -34
+ Misses 50000 49978 -22
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 24577 |
1 similar comment
Information: QA ran without warnings. Pipeline 24577 |
Indeed. This surfaced while doing the work recently.
sounds reasonable.
you suggested setting an event and that sounds good to me.
There's a ticket for this already. If you're working on it, please assign it to yourself: https://redmine.openinfosecfoundation.org/issues/7254
Sounds correct. This case is not covered with the current header reuse approach. This explanation should go in the commit and there should be another ticket for this. Thank you for improving this parser! :) |
Link to ticket: https://redmine.openinfosecfoundation.org/issues/
None, oss-fuzz https://issues.oss-fuzz.com/u/1/issues/393414238
Describe changes:
@inashivb what do you think ?