Skip to content

detect: warning on rule with pcre only on stream#11878

Closed
catenacyber wants to merge 1 commit intoOISF:masterfrom
catenacyber:detect-pcre-stream-warning-4858-v1
Closed

detect: warning on rule with pcre only on stream#11878
catenacyber wants to merge 1 commit intoOISF:masterfrom
catenacyber:detect-pcre-stream-warning-4858-v1

Conversation

@catenacyber
Copy link
Contributor

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

Describe changes:

  • detect: warning on rule with pcre only on stream

So as to avoid oss-fuzz timing out using a known to be bad rule

and failure on fuzzing mode, to avoid fuzzing blocks on timeouts
with a bad rule

Ticket: 4858
@codecov
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.63%. Comparing base (45eb7e4) to head (187b0ff).
Report is 42 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11878      +/-   ##
==========================================
+ Coverage   82.60%   82.63%   +0.03%     
==========================================
  Files         912      912              
  Lines      249351   249366      +15     
==========================================
+ Hits       205965   206068     +103     
+ Misses      43386    43298      -88     
Flag Coverage Δ
fuzzcorpus 60.63% <100.00%> (+0.03%) ⬆️
livemode 18.72% <0.00%> (-0.01%) ⬇️
pcap 44.11% <88.88%> (+0.05%) ⬆️
suricata-verify 62.00% <100.00%> (-0.04%) ⬇️
unittests 58.94% <100.00%> (+0.01%) ⬆️

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 22994

}
}
if (has_pcre && !has_other && s->init_data->sm_cnt == 1) {
SCLogWarning("signature id %d uses pcre on raw stream", s->id);
Copy link
Member

Choose a reason for hiding this comment

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

I would like to remove this warning, and move it to the rule analyzer instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is the rule analyzer ? Is it not only run with --engine-analysis ?

I want fuzzing on rules + pcap to skip these bad rules by erroring on it, so that oss-fuzz can find other timeouts

Copy link
Member

Choose a reason for hiding this comment

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

yes, talking only about the SCLogWarning statement. Analyzer is --engine-analysis.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, so we already have warn_pcre_no_content in --engine-analysis

@catenacyber
Copy link
Contributor Author

Replaced by #11953

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