Repository navigation
next/1569/20261126/v1 - #16742
Merged
Merged
next/1569/20261126/v1#16742
Conversation
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
left a comment
There was a problem hiding this comment.
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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
WARNING:
Pipeline = 36134 |
victorjulien
marked this pull request as ready for review
November 26, 2026 09:21
This was referenced Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Staging (2026-11-26 04:19Z):
SV_BRANCH=OISF/suricata-verify#3578
Redmine
Pinned at staging time: a later change to a source PR is not part of this run.