rust/sip: register parser for tcp v12#10037
Closed
glongo wants to merge 8 commits intoOISF:masterfrom
Closed
Conversation
Accepts valid characters as defined in RFC3261.
The `is_version_char` function incorrectly allowed characters that are not part of the valid SIP version "SIP/2.0". For instance, 'HTTP/1.1' was mistakenly accepted as a valid SIP version, although it's not. This commit fixes the issue by updating the condition to strictly check for the correct version string.
This patch lets the parser to work over tcp protocol, taking care of handling data before calling the request/response parsers. Ticket OISF#3351.
This patch permits to set a direction when a new transaction is created in order to avoid 'signature shadowing' as reported by Eric Leblond in commit 5aaf507
This permits to detect the SIP protocol using pattern matching instead of probing parser. Since it is no longer used, the respective probing functions have been removed.
3 tasks
Contributor
Author
|
I've just set the correct |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #10037 +/- ##
==========================================
+ Coverage 78.42% 82.41% +3.99%
==========================================
Files 970 970
Lines 271175 271530 +355
==========================================
+ Hits 212676 223793 +11117
+ Misses 58499 47737 -10762
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
WARNING:
Pipeline 17018 |
|
Re-ran TLPW2, uptime sometimes matches baseline and other times is a bit up. |
catenacyber
reviewed
Dec 13, 2023
| &stream_slice, | ||
| input, | ||
| input.len() as i64, | ||
| SIPFrameType::Pdu as u8, |
Contributor
There was a problem hiding this comment.
This frame does not look right :
A TCP sent here may have 0 or multiple SIP PDUs
This should be done after sip_parse_request returned Ok
Cf #10048 (MQTT current implementation is wrong)
catenacyber
requested changes
Dec 14, 2023
Contributor
catenacyber
left a comment
There was a problem hiding this comment.
Frames on tcp should support multiple PDUs in one call to parse_request_tcp (same for response)
Contributor
Author
|
New PR: #10058 |
This was referenced Dec 19, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make sure these boxes are signed before submitting your Pull Request -- thank you.
https://docs.suricata.io/en/latest/devguide/codebase/contributing/contribution-process.html
https://suricata.io/about/contribution-agreement/ (note: this is only required once)
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/3351
Describe changes:
Provide values to any of the below to override the defaults.
To use a pull request use a branch name like
pr/NwhereNis thepull request number.
Alternatively,
SV_BRANCHmay also be a link to anOISF/suricata-verify pull-request.