Project

General

Profile

Actions

Bug #8741

closed
JI JI

smtp: complete BDAT transactions at LAST

Bug #8741: smtp: complete BDAT transactions at LAST

Added by Jason Ish 2 months ago. Updated 25 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Found via an AI review of the SMTP work after merge, appears to be valid.

The SMTP parser extracts the BDAT length but does not retain the LAST marker.
Consequently, the final chunk and reply do not complete the transaction. A
subsequent MAIL FROM can be merged into the previous transaction, retaining its
envelope and firewall state.

Related issues:

  • BDAT 0 LAST incorrectly enters data mode.
  • The chunk index is not reset for each BDAT.
  • Input is not consumed strictly to the declared octet boundary.

Track LAST, reset accounting per chunk, consume the exact chunk length, and
complete both transaction directions at the final chunk/reply.

Add coverage for non-empty LAST, zero-length LAST, and multiple chunks followed
by a new message.

Related to #8393.


Subtasks 1 (0 open1 closed)

Bug #8876: smtp: complete BDAT transactions at LAST (8.0.x backport)ClosedJason IshActions

Related issues 2 (0 open2 closed)

Related to Suricata - Feature #8393: firewall: support SMTP hook states for firewall rule evaluationClosedJason IshActions
Related to Suricata - Bug #8995: smtp: rejected BDAT reply leaves parser in data modeClosedJason IshActions

JI Updated by Jason Ish 2 months ago Actions #1

  • Related to Feature #8393: firewall: support SMTP hook states for firewall rule evaluation added

JI Updated by Jason Ish 2 months ago Actions #2

  • Description updated (diff)

SB Updated by Shivani Bhardwaj 2 months ago Actions #3

  • Status changed from New to Assigned

JI Updated by Jason Ish 2 months ago Actions #4

  • Description updated (diff)
  • Status changed from Assigned to In Progress

JI Updated by Jason Ish about 2 months ago Actions #5

  • Status changed from In Progress to In Review

JI Updated by Jason Ish about 1 month ago Actions #6

  • Label Needs backport to 8.0 added

Investigate backport to 8.

OT Updated by OISF Ticketbot about 1 month ago Actions #7

  • Subtask #8876 added

OT Updated by OISF Ticketbot about 1 month ago Actions #8

  • Label deleted (Needs backport to 8.0)

JI Updated by Jason Ish about 1 month ago Actions #9

  • Status changed from In Review to Resolved

JI Updated by Jason Ish 25 days ago Actions #10

  • Status changed from Resolved to Closed

JI Updated by Jason Ish 18 days ago Actions #11

  • Related to Bug #8995: smtp: rejected BDAT reply leaves parser in data mode added
Actions

Also available in: PDF Atom