Skip to content

sip: make pattern matching more robust v5 - #15581

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

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

Conversation

@glongo

@glongo glongo commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

glongo added 4 commits June 8, 2026 21:27
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
@glongo
glongo requested review from a team and jasonish as code owners June 8, 2026 20:19
@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 = 31904

@victorjulien victorjulien added this to the 9.0 milestone Jun 9, 2026
@victorjulien

Copy link
Copy Markdown
Member

This will need a rebase after #15592 is merged.

@victorjulien victorjulien added the needs rebase Needs rebase to main label Jun 10, 2026

@victorjulien victorjulien left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

needs rebase

@glongo

glongo commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Replaced with #15609

@glongo glongo closed this Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Needs rebase to main

Development

Successfully merging this pull request may close these issues.

3 participants