Skip to content

Detect http trailers 8256 v1#14717

Closed
catenacyber wants to merge 7 commits intoOISF:mainfrom
catenacyber:detect-http-trailers-8256-v1
Closed

Detect http trailers 8256 v1#14717
catenacyber wants to merge 7 commits intoOISF:mainfrom
catenacyber:detect-http-trailers-8256-v1

Conversation

@catenacyber
Copy link
Contributor

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

Describe changes:

  • detect: http.headers works on trailers even if it is not fast_pattern
    To do so :
  • convert many variables/fields/args describing a tx_progress to use u8 instead of int or other
  • adds a max_progress field to DetectEngineAppInspectionEngine
  • adds a DetectAppLayerInspectEngineRegisterMax function to register an app engine with a min_progress < max_progress

SV_BRANCH=OISF/suricata-verify#2894

Will help to use generic DetectEngineInspectBufferGeneric
reuse generic DetectEngineInspectBufferGeneric
@catenacyber
Copy link
Contributor Author

This comes on top of approved #14711

if (t->sig_list == app_state_list_id) {
SCLogDebug("engine %s for state list", t->engine_name);
engine_progress = -1;
engine_progress = UINT8_MAX;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this really used ?..

@suricata-qa
Copy link

ERROR:

ERROR: QA failed on SURI_TLPR1_alerts_cmp.

Pipeline = 29339

@catenacyber catenacyber marked this pull request as draft January 29, 2026 20:04
instead of a single progress.

Will help for keywords such as http.header which can act on
headers and trailers progress

Tx engines are inspected between min_progress and max_progress
So, we do not give up and says a signature does not match
when it will match on later max_progress

And we can match as early as possible, especially in IPS mode.
Function to register a app engine with a min and max progress
as it registers the app engine up to the trailers progress

Ticket: 8256
@catenacyber catenacyber force-pushed the detect-http-trailers-8256-v1 branch from cdbfe5e to c533d34 Compare January 29, 2026 20:37
@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 95.28302% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.15%. Comparing base (2cf9a32) to head (d92690d).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14717   +/-   ##
=======================================
  Coverage   82.14%   82.15%           
=======================================
  Files        1007     1007           
  Lines      263194   263192    -2     
=======================================
+ Hits       216210   216221   +11     
+ Misses      46984    46971   -13     
Flag Coverage Δ
fuzzcorpus 60.20% <87.73%> (+<0.01%) ⬆️
livemode 18.87% <39.62%> (-0.01%) ⬇️
pcap 44.63% <68.86%> (+0.02%) ⬆️
suricata-verify 65.36% <95.28%> (+<0.01%) ⬆️
unittests 59.36% <71.69%> (+<0.01%) ⬆️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@catenacyber
Copy link
Contributor Author

Next in #14724

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