Skip to content

Backport8 8684 8699 v1 - #16503

Closed
catenacyber wants to merge 2 commits into
OISF:main-8.0.xfrom
catenacyber:backport8-8684-8699-v1
Closed

catenacyber wants to merge 2 commits into
OISF:main-8.0.xfrom
catenacyber:backport8-8684-8699-v1

Conversation

@catenacyber

@catenacyber catenacyber commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

catenacyber and others added 2 commits October 23, 2026 14:04
Ticket: 8684

The behavior of the rule
alert ip any any -> any any (pcre:"/.*mc|\H+$/"; sid:4;)
depended upon the presence of another rule such as
alert ip any any -> any any (content:"*mcH"; sid:5;)

With the sid 5 content rule, the code went through PrefilterPktStream
which updated raw_stream_progress, which ended up updating raw_progress_rel
which was used on later packets to know where to start.

Without the sid 5 content rule, there was no update of these progresses.
It led to quadratic complexity, as for each new packet, we ran
the pcre engine on the whole tcp stream from the beginning, with
the newly added payload data.

Fix is to process sid 4 pcre rule the same way whether there is
or there is not a sid 5 content rule.

So, in case we do not have a mpm store for a signature group head,
we register a dummy stream prefilter, whose goal will just be
to update raw_stream_progress

(cherry picked from commit f87b8e6)
Change the byte order of vlan TCI when extracting it
from vlan_hdr in xdp_filter.c. This fixes xdp bypass for vlan tagged
packets, as without the fix flows that are supposed to be bypassed by
the xdp filter are not bypassed.

Ticket: 8699
(cherry picked from commit 5cb7a0d)
@catenacyber
catenacyber requested review from a team and victorjulien as code owners October 23, 2026 12:05

@suricata-review-bot suricata-review-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI-generated review.

Verdict: approve

No high- or medium-severity findings.

Automated at commit 055855bd1580 using Claude Code with claude-opus-5-5/xhigh. Run: b8d69c0621edd953.

@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.68%. Comparing base (d3ddd9a) to head (055855b).

Additional details and impacted files
@@              Coverage Diff               @@
##           main-8.0.x   #16503      +/-   ##
==============================================
- Coverage       81.69%   81.68%   -0.01%     
==============================================
  Files            1020     1020              
  Lines          281745   281760      +15     
==============================================
- Hits           230161   230149      -12     
- Misses          51584    51611      +27     
Flag Coverage Δ
fuzzcorpus 63.63% <100.00%> (+<0.01%) ⬆️
livemode 18.43% <0.00%> (-0.02%) ⬇️
netns 19.95% <31.57%> (-0.01%) ⬇️
pcap 44.33% <31.57%> (-0.07%) ⬇️
suricata-verify 65.11% <100.00%> (-0.05%) ⬇️
unittests 58.67% <84.21%> (+<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.

@victorjulien victorjulien added this to the 8.0 milestone Oct 23, 2026
@suricata-qa

Copy link
Copy Markdown

WARNING:

field baseline test %
SURI_TLPW2_single_stats_chk
.flow.elephant_toserver - 0 -
.flow.elephant_toclient - 0 -
SURI_TLPW2_autofp_stats_chk
.flow.elephant_toserver - 0 -
.flow.elephant_toclient - 0 -
SURI_TLPW1_stats_chk
.flow.elephant_toserver - 0 -
.flow.elephant_toclient - 0 -
SURI_TLPR1_stats_chk
.flow.elephant_toserver - 0 -
.flow.elephant_toclient - 0 -
IPS_AFP_stats_chk
.flow.elephant_toserver - 0 -
.flow.elephant_toclient - 0 -
TREX_GENERIC_stats_chk
.flow.elephant_toserver - 0 -
.flow.elephant_toclient - 0 -

Pipeline = 35208

@victorjulien

Copy link
Copy Markdown
Member

Merged in #16509, thanks!

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.

5 participants