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 v4 #12438

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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

#12310 with needed rebase

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 Jan 21, 2025

Codecov Report

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

Project coverage is 80.66%. Comparing base (95e8427) to head (b7177f4).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12438      +/-   ##
==========================================
+ Coverage   80.63%   80.66%   +0.03%     
==========================================
  Files         920      920              
  Lines      258704   258864     +160     
==========================================
+ Hits       208595   208804     +209     
+ Misses      50109    50060      -49     
Flag Coverage Δ
fuzzcorpus 56.82% <80.51%> (+<0.01%) ⬆️
livemode 19.39% <1.29%> (-0.01%) ⬇️
pcap 44.30% <18.18%> (-0.04%) ⬇️
suricata-verify 63.23% <25.97%> (-0.03%) ⬇️
unittests 58.55% <93.18%> (+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 24291

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.

2 participants