8.0.x: smtp back ports - v1 - #16043
Open
jasonish wants to merge 11 commits into
Open
Conversation
Add minimal SMTP progress states to support envelope validation before moving to data. Update SMTP, file and email keywords to hook into the appropriate states. Purposefully kept minimal for now as to not break the current idea of an SMTP transaction, which is probably not ideal for firewall mode. Ticket: OISF#8393 (cherry picked from commit c2728ee)
Add directionality to completion states, and replace tx->done by checking for both directions being complete. This means that the transaction is now not complete until the server responds to the clients of data marker, previously the tx was completed when the client send end of data without waiting for the server response. This keeps smtp:response_complete from being exposed before the server response is parsed. Ticket: OISF#8393 (cherry picked from commit 7b31f41)
Simply makes the follow diff a little easier to read. (cherry picked from commit 2676d1b)
A BDAT command that failed to parse, such as "BDAT 5 X", returned -1, disabling SMTP parsing for the rest of the flow. A server may reject the command and continue the session, leaving following messages uninspected. Instead raise a decoder event and queue the command as an ordinary command. Ticket: OISF#8741 (cherry picked from commit 60e0df6)
SMTPGetLine assigned response frames to the current transaction even when a queued reply belonged to an older transaction. Use the queued command owner so frame EVE output and frame-based detection receive the correct transaction id. Includes some re-org to avoid prototypes for static functions. Ticket: OISF#8741 (cherry picked from commit 57ae571)
Scan-build reports a possible NULL dereference that is not reachable. (cherry picked from commit 4481f27)
Member
Author
|
Not rushing for 8.0.x, just with the last merge to |
Member
Author
|
AI-generated review posted automatically by Suricata ai-review. Verdict: approve No high- or medium-severity findings. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main-8.0.x #16043 +/- ##
==============================================
- Coverage 81.68% 81.61% -0.07%
==============================================
Files 1016 1016
Lines 276981 277124 +143
==============================================
- Hits 226245 226186 -59
- Misses 50736 50938 +202
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
WARNING:
Pipeline = 33089 |
victorjulien
approved these changes
Aug 19, 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.
SMTP backports related to https://redmine.openinfosecfoundation.org/issues/8393.
The impact to existing 8.0.x users is minimal, with more correctness and
accuracy being the main issue.
pcap_cnt's due to finer grained progress tracking
SV_BRANCH=OISF/suricata-verify#3287