Skip to content

next/1478/20260904/v1 - #16185

Merged
victorjulien merged 9 commits into
OISF:mainfrom
victorjulien:next/1478/20260904/v1
Sep 5, 2026
Merged

next/1478/20260904/v1#16185
victorjulien merged 9 commits into
OISF:mainfrom
victorjulien:next/1478/20260904/v1

Conversation

Lukas Sismis and others added 9 commits September 4, 2026 21:20
Some firewall rule analysis output had hardcoded paths.
This commit is querying respective tables and uses the actual
values.

Ticket: 8951
A secondary action given without an explicit scope inherits the scope of
the primary action, but was never validated against the scopes it
supports itself. `pass` only supports packet and flow scope but
the inheritance was never verified.

Ticket: 8954
Previously, hook sequences in both rules and default policies
allowed `pass` to be combined with incompatible hooks (e.g.
reject or drop).

This commit clamps pass to accept only.

Ticket: 8954
Ticket: 8731

Adds a configurable limit to string lengths to avoid to retain
too much memory for too long, and avoid producing log events
that are too big
And log it with from_utf8_lossy

Since we may now cut a too big failure_reason breaking a valid
utf-8 string

Ticket: 8731
The fallback memrchr() implementation initialized the search pointer to
the one-past-end position and dereferenced it before decrementing, which
is undefined behavior in C.

Update the implementation to decrement the pointer before dereferencing
while preserving memrchr() semantics. Compare bytes using unsigned char
semantics to ensure values with the high bit set are handled correctly.

Refactor the fallback into a local SCMemrchrFallback() helper so it can
be exercised by unit tests on platforms that provide a native memrchr()
implementation.

Expand the unit test to cover first, middle, last, duplicate, single-byte,
zero-length, absent-element, and high-byte values.

Ticket: 9010

Signed-off-by: Urval Kheni <kheniurval777@gmail.com>
@suricata-qa

Copy link
Copy Markdown

WARNING:

field baseline test %
SURI_TLPR1_stats_chk
.app_layer.flow.ftp_data 659 639 96.97%

Pipeline = 33801

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.66102% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.14%. Comparing base (51ac400) to head (4912598).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16185      +/-   ##
==========================================
- Coverage   83.14%   83.14%   -0.01%     
==========================================
  Files        1004     1004              
  Lines      277607   277682      +75     
==========================================
+ Hits       230828   230874      +46     
- Misses      46779    46808      +29     
Flag Coverage Δ
fuzzcorpus 61.75% <25.51%> (-0.02%) ⬇️
livemode 18.42% <3.06%> (-0.04%) ⬇️
netns 22.85% <20.40%> (-0.02%) ⬇️
pcap 45.45% <40.81%> (+0.01%) ⬆️
suricata-verify 67.33% <75.51%> (-0.03%) ⬇️
unittests 58.53% <34.74%> (-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.

@inashivb inashivb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 🚀

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.

6 participants