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

Dataset set postmatch 5576 v8 #11719

Closed

Conversation

catenacyber
Copy link
Contributor

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

Describe changes:

  • detect/dataset: delay set operation after signature full match

SV_BRANCH=OISF/suricata-verify#2000

#11714 with diff split into different commits, with more explanations and more comments in the code

So, now Victor, you will ask me for more tests

Right ?

Will be useful for dataset, when it needs to find a transaction
buffer again.
The set operation of dataset keyword was done even if signature
did not fully match, which is not the expected behavior.
We want dataset to behave like flowbits for instance.

This patch changes the behavior of the dataset keyword to do a
match and a post match for the set operation.
The postmatch retrieves the data, using the list identifier
associated to the buffer for this signature.

This avoids to store the buffer(s), when we do not have a
dedicated storage (per signature and per tx) that can own
and clean arbitrary buffers over multiple packets, in
the case the transaction spans over multiple packets
with different tx progresses for instance.
If detection runs on one packet, the InspectionBuffer are
cached and fast to get.
The most expensive case if for multi buffers, where we
need to run detection again, to see which occurences
match all payload keywords and should be added in the dataset.

Ticket: OISF#5576
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 95.38462% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82.63%. Comparing base (685baa9) to head (1259db5).
Report is 56 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11719      +/-   ##
==========================================
- Coverage   82.63%   82.63%   -0.01%     
==========================================
  Files         919      919              
  Lines      248925   248979      +54     
==========================================
+ Hits       205703   205743      +40     
- Misses      43222    43236      +14     
Flag Coverage Δ
fuzzcorpus 60.91% <93.84%> (+0.02%) ⬆️
livemode 18.74% <53.84%> (+0.02%) ⬆️
pcap 44.09% <7.69%> (-0.06%) ⬇️
suricata-verify 61.87% <95.38%> (-0.01%) ⬇️
unittests 59.00% <7.69%> (-0.01%) ⬇️

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

@suricata-qa
Copy link

ERROR:

ERROR: QA failed on SURI_TLPR1_alerts_cmp.

Pipeline 22386

@suricata-qa
Copy link

ERROR:

ERROR: QA failed on SURI_TLPR1_alerts_cmp.

Pipeline 22428

@catenacyber
Copy link
Contributor Author

@ct0br0 could I have some more data about this QA report ?

@catenacyber catenacyber marked this pull request as draft September 23, 2024 14:57
@catenacyber
Copy link
Contributor Author

Draft: QA results to investigate, (I think it will end in a needed QA rebaseline)

@catenacyber catenacyber added the needs rebase Needs rebase to master label Sep 25, 2024
@catenacyber
Copy link
Contributor Author

Rebased in #11834

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs rebase Needs rebase to master
Development

Successfully merging this pull request may close these issues.

3 participants