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

Detect multiprotocol keywords 7304 v5 #12608

Conversation

catenacyber
Copy link
Contributor

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

Describe changes:

  • cleaner code for multi app-layer keywords such as ja4

#12438 with review taken into account

such as ja4.

Why ?

We do not want to see hard-coded protocol constants such as
ALPROTO_QUIC directly used in generic code in detect-parse.c

How ?
From the keyword point of view, this commit adds the function
DetectSignatureSetMultiAppProto which is similar to
DetectSignatureSetAppProto but takes multiple alprotos.
It restricts the signature alprotos to a set of possible alprotos
and errors out if the interstion gets empty.

The data structure SignatureInitData gets extended with
a fixed-length array, as the use case is a sparse number of protocols

Ticket: 7304
instead of hardcoding list : removes usage of ALPROTO_QUIC and
ALPROTO_TLS in generic SigValidate

Ticket: 7304
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 97.77778% with 4 lines in your changes missing coverage. Please review.

Project coverage is 80.76%. Comparing base (10ede91) to head (8cfbbea).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12608      +/-   ##
==========================================
+ Coverage   80.74%   80.76%   +0.02%     
==========================================
  Files         931      931              
  Lines      259144   259308     +164     
==========================================
+ Hits       209242   209437     +195     
+ Misses      49902    49871      -31     
Flag Coverage Δ
fuzzcorpus 56.97% <84.41%> (+<0.01%) ⬆️
livemode 19.37% <1.29%> (-0.01%) ⬇️
pcap 44.14% <18.18%> (-0.02%) ⬇️
suricata-verify 63.42% <25.97%> (-0.01%) ⬇️
unittests 58.37% <93.33%> (+0.03%) ⬆️

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

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 24759

@catenacyber
Copy link
Contributor Author

Next in #12623

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.

4 participants