Skip to content

detect/firewall: fix later LTE rule confusing policy checks - #16156

Draft
victorjulien wants to merge 1 commit into
OISF:mainfrom
victorjulien:firewall-bug-8944/v6
Draft

victorjulien wants to merge 1 commit into
OISF:mainfrom
victorjulien:firewall-bug-8944/v6

Conversation

@victorjulien

Copy link
Copy Markdown
Member

Handle cases where a non-matching rule followed later by an LTE rule with a overlapping progress still work correctly.

E.g.:

    drop:flow tls:client_hello_done .. tls.sni; content:"match" \
            content:"no-match";
    accept:flow tls:<client_hello_done .. tls.sni; content:"match"

In this case the tls:client_in_progress state needs to be accepted by the 2nd rule, which acts as accept:hook on that state.

Additionally make sure that LTE rules that do not match their "main" condition, are treated as the final CANT_MATCH.

Ticket: #8944.

SV_BRANCH=OISF/suricata-verify#3343

Handle cases where a non-matching rule followed later by an LTE rule
with a overlapping progress still work correctly.

E.g.:

        drop:flow tls:client_hello_done .. tls.sni; content:"match" \
                content:"no-match";
        accept:flow tls:<client_hello_done .. tls.sni; content:"match"

In this case the `tls:client_in_progress` state needs to be accepted by
the 2nd rule, which acts as `accept:hook` on that state.

Additionally make sure that LTE rules that do not match their "main"
condition, are treated as the final CANT_MATCH.

Ticket: OISF#8944.
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.15385% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.12%. Comparing base (cd7f775) to head (65e761c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16156   +/-   ##
=======================================
  Coverage   83.11%   83.12%           
=======================================
  Files        1004     1004           
  Lines      277558   277597   +39     
=======================================
+ Hits       230692   230745   +53     
+ Misses      46866    46852   -14     
Flag Coverage Δ
fuzzcorpus 61.60% <17.30%> (-0.01%) ⬇️
livemode 18.40% <0.00%> (-0.01%) ⬇️
netns 22.83% <48.07%> (+<0.01%) ⬆️
pcap 45.37% <17.30%> (-0.09%) ⬇️
suricata-verify 67.30% <94.23%> (-0.04%) ⬇️
unittests 58.53% <17.30%> (-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.

@jasonish

jasonish commented Sep 1, 2026

Copy link
Copy Markdown
Member

@suricata-qa

Copy link
Copy Markdown

Information: QA ran without warnings.

Pipeline = 33605

@catenacyber

Copy link
Copy Markdown
Contributor

Why is this a draft ?

@victorjulien victorjulien mentioned this pull request Sep 17, 2026
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