Skip to content

next/1569/20261126/v1 - #16742

Merged
victorjulien merged 4 commits into
OISF:mainfrom
victorjulien:next/1569/20261126/v1
Nov 26, 2026
Merged

victorjulien merged 4 commits into
OISF:mainfrom
victorjulien:next/1569/20261126/v1

Conversation

@victorjulien

Copy link
Copy Markdown
Member

victorjulien and others added 4 commits November 26, 2026 04:20
SetupStreamCallbackData() holds back the inspection of an open or
incomplete frame until 2500 more bytes are available. It compared
frame->inspect_progress, which is relative to the frame start, with
the absolute stream offset of the usable data. So the check was short
by the frame's offset: a frame at offset O was inspected once
2500 - O new bytes had arrived, and a frame at or past offset 2500 on
every packet that updated the app-layer. Each of those inspections
covers the new data, so a frame rule alerted again for every segment.

Make the wanted offset absolute, as the complete-frame branch of the
same function already does. IPS mode does not use this check.

Ticket: OISF#9444.
Frame offsets are absolute since b43dc5a ("app-layer/frames: use
absolute frame offset"), but FrameJson() still added the stream base
offset to frame->offset when it computed how far the app-layer had
progressed into a TCP frame. Once the stream had released data, that
window came out short by the base offset, so frames failed the logging
threshold and were pruned without a frame record, while alerts still
referenced their ids.

Use the frame offset as is.

Ticket: OISF#9446.
Add helpers that result in fewer compiler instructions than open-coded
comparisons as done in detect-flowint.c to the common header available
for use everywhere.

Suggested-by: Frank Dressler <frank@dressler.pro>

@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 ca5de3eb4167 using Claude Code with claude-opus-5-5/xhigh. Run: 3ff2936f8454fdea.

@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.97%. Comparing base (1f762c1) to head (ca5de3e).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16742      +/-   ##
==========================================
- Coverage   83.97%   83.97%   -0.01%     
==========================================
  Files        1008     1008              
  Lines      286491   286489       -2     
==========================================
- Hits       240577   240565      -12     
- Misses      45914    45924      +10     
Flag Coverage Δ
fuzzcorpus 61.62% <57.14%> (-0.01%) ⬇️
livemode 25.96% <14.28%> (-0.01%) ⬇️
netns 26.30% <14.28%> (-0.03%) ⬇️
pcap 46.16% <14.28%> (-0.03%) ⬇️
suricata-verify 69.05% <100.00%> (+0.01%) ⬆️
unittests 59.19% <42.85%> (+<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.

@suricata-qa

Copy link
Copy Markdown

WARNING:

field baseline test %
SURI_TLPR1_stats_chk
.app_layer.flow.ftp_data 656 617 94.05%

Pipeline = 36134

@victorjulien
victorjulien marked this pull request as ready for review November 26, 2026 09:21

@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 🚀

@victorjulien
victorjulien merged commit ca5de3e into OISF:main Nov 26, 2026
111 of 113 checks passed
@victorjulien
victorjulien deleted the next/1569/20261126/v1 branch November 26, 2026 11:03
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