Actions
Optimization #7251
opendcerpc: mimic gap behavior if invalid data is sent to protocol parser
Effort:
Difficulty:
low
Label:
Description
Let's assume that the RFC XXX of a Protocol P defines that its:
- header is 4 bytes in total
- byte 1 tells protocol version
- byte 2 tells the type of request/response
- bytes 3 and 4 of its header tell how big the entire fragment is
- rest of the bytes are the fragment data
Request 1:
-------------------------- | Header (4B) | <- this tells that the total length of the fragment is 20 bytes -------------------------- | | | | | DATA | | | --------------------------
Observation: Request 1 is hence completed.
Request 2:
-------------------------- | | | | | DATA | | | --------------------------
Observation: The header of this request gives a protocol version and request type that are invalid so the protocol parser rejects it and returns an error.
Behavior to be implemented: In case of Request 2, the parser should mimic gap behavior i.e. skip over the invalid data for as long as it lasts.
Challenges:
- No way to know the length of the invalid data beforehand.
Possible solutions:
- Maybe
Applayer::API can be extended to have a fn that allows to skip over data until a certain byte pattern is found. To be discussed. - The protocol parser can itself just not do anything w the data and ask for more data until it has valid data.
Updated by Victor Julien 12 months ago
- Target version changed from 8.0.0-beta1 to 8.0.0-rc1
Updated by Victor Julien 9 months ago
- Target version changed from 8.0.0-rc1 to 9.0.0-beta1
Updated by Shivani Bhardwaj about 1 month ago
- Status changed from Assigned to In Progress
Updated by Shivani Bhardwaj about 1 month ago
- Status changed from In Progress to In Review
Updated by Philippe Antoine 24 days ago
I am not sure I understand this ticket :
If
The header of this request gives a protocol version and request type that are invalid
Then we should just error and stable parsing for the rest of the flow...
Updated by Philippe Antoine 24 days ago
Updated by Philippe Antoine 24 days ago
I think https://redmine.openinfosecfoundation.org/issues/7254 is the problem here
Updated by Philippe Antoine 1 day ago
- Related to Bug #7254: dcerpc: parser does not support multiple PDUs added
Updated by Philippe Antoine 1 day ago
I think this issue should be rejected in favor of #7254
Actions