Skip to content

sip: make pattern matching more robust v6 - #15609

Closed
glongo wants to merge 4 commits into
OISF:mainfrom
glongo:dev-8355-sip-pm-v6
Closed

sip: make pattern matching more robust v6#15609
glongo wants to merge 4 commits into
OISF:mainfrom
glongo:dev-8355-sip-pm-v6

Conversation

@glongo

@glongo glongo commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

glongo added 4 commits June 11, 2026 13:37
SIP and SSDP share method names like NOTIFY and SUBSCRIBE,
causing SSDP traffic to be misidentified as SIP.
Add a probing parser callback that checks for "SIP/" in the
payload before accepting a pattern match.

Example of a misidentified flow before the fix:
{"timestamp":"2014-02-27T19:44:43.164211+0100","flow_id":986757542077835,"event_type":"flow","src_ip":"192.168.1.1","src_port":9489,"dest_ip":"239.255.255.250
","dest_port":1900,"ip_v":4,"proto":"UDP","app_proto":"sip","flow":{"..."}}

After the fix:
{"timestamp":"2014-02-27T19:44:43.164211+0100","flow_id":986757542077835,"event_type":"flow","src_ip":"192.168.1.1","src_port":9489,"dest_ip":"239.255.255.250
","dest_port":1900,"ip_v":4,"proto":"UDP","app_proto":"failed","flow":{"..."}}

Ticket OISF#8355
It's no longer useful to set an event when the data is incomplete,
since an error is returned.

Ticket OISF#8524
@victorjulien victorjulien added this to the 9.0 milestone Jun 11, 2026
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.87%. Comparing base (d154484) to head (ba876ce).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15609      +/-   ##
==========================================
- Coverage   82.89%   82.87%   -0.02%     
==========================================
  Files        1006     1006              
  Lines      273487   273527      +40     
==========================================
- Hits       226710   226696      -14     
- Misses      46777    46831      +54     
Flag Coverage Δ
fuzzcorpus 61.36% <93.75%> (-0.05%) ⬇️
livemode 18.41% <50.00%> (-0.07%) ⬇️
netns 22.78% <50.00%> (+<0.01%) ⬆️
pcap 45.19% <93.75%> (-0.03%) ⬇️
suricata-verify 66.64% <93.75%> (-0.01%) ⬇️
unittests 58.52% <76.78%> (+<0.01%) ⬆️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@suricata-qa

Copy link
Copy Markdown

WARNING:

field baseline test %
SURI_TLPR1_stats_chk
.app_layer.flow.sip_tcp 2 0 -
.app_layer.flow.sip_udp 154 36 23.38%
.app_layer.error.sip_tcp.parser 36 0 -
.app_layer.error.sip_udp.parser 8849 0 -
.app_layer.tx.sip_udp 2 40 2000.0%

Pipeline = 31972

@victorjulien

Copy link
Copy Markdown
Member

Merged in #15610, thanks!

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.

3 participants