Skip to content
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

rust/sip: register parser for tcp v7 #9483

Closed
wants to merge 5 commits into from
Closed

Conversation

glongo
Copy link
Contributor

@glongo glongo commented Sep 13, 2023

Make sure these boxes are signed before submitting your Pull Request -- thank you.

Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/3351

Describe changes:

  • Rebase
  • Commits squashed
  • Added comment with reference to RFC3261

Provide values to any of the below to override the defaults.

To use a pull request use a branch name like pr/N where N is the
pull request number.

Alternatively, SV_BRANCH may also be a link to an
OISF/suricata-verify pull-request.

SV_REPO=
SV_BRANCH=pr/1386
SU_REPO=
SU_BRANCH=
LIBHTP_REPO=
LIBHTP_BRANCH=

Accepts valid characters as defined in RFC3261.
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
@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Merging #9483 (d9c9fa3) into master (2b57179) will decrease coverage by 0.03%.
The diff coverage is 80.41%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9483      +/-   ##
==========================================
- Coverage   82.18%   82.16%   -0.03%     
==========================================
  Files         968      968              
  Lines      274199   274336     +137     
==========================================
+ Hits       225363   225406      +43     
- Misses      48836    48930      +94     
Flag Coverage Δ
fuzzcorpus 64.05% <39.17%> (-0.05%) ⬇️
suricata-verify 60.88% <80.41%> (-0.03%) ⬇️
unittests 62.85% <7.73%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@@ -50,6 +50,7 @@ vars:
GENEVE_PORTS: 6081
VXLAN_PORTS: 4789
TEREDO_PORTS: 3544
SIP_PORTS: "[5060, 5061]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is meant to be used in signatures, right ?

git grep SIP_PORTS does not yield anything else

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that's right.

if AppLayerParserStateIssetFlag(pstate, APP_LAYER_PARSER_EOF_TS) > 0 {
return AppLayerResult::ok();
} else {
return AppLayerResult::err();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can we end up here ? stream_slice.is_empty() && AppLayerParserStateIssetFlag(pstate, APP_LAYER_PARSER_EOF_TS) == 0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure it's needed actually, but I thought that it would be good to check if eof is reached.

@catenacyber
Copy link
Contributor

catenacyber commented Sep 13, 2023

Maybe commit message rust/sip: register parser for sip can be rust/sip: register parser for tcp

@catenacyber
Copy link
Contributor

Where should we document this change @jufajardini ? upgrade section ?

@glongo
Copy link
Contributor Author

glongo commented Sep 13, 2023

Maybe commit message rust/sip: register parser for sip can be rust/sip: register parser for tcp

It's meant to be tcp indeed, but I don't know why I wrote sip :)

@jufajardini
Copy link
Contributor

Where should we document this change @jufajardini ? upgrade section ?

(Sorry for the belated answer, I obviously missed this.)

I think that:

  • upgrade section
  • suricata.yaml (for the ports config portion)
  • maybe something related to output, to indicate at least the sip_tcp and sip_udp bit?

Copy link
Contributor

@catenacyber catenacyber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Giuseppe. Still need some nit and a bit of doc

@victorjulien
Copy link
Member

Since 8 development is now started, we can get this in when you're ready.

@glongo
Copy link
Contributor Author

glongo commented Nov 24, 2023

Replaced by #9880

@glongo glongo closed this Nov 24, 2023
@glongo glongo deleted the dev-sip-tcp-v7 branch February 28, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants