Bug #9475
openpop3: parser stops when a RETR end marker arrives after the body
Description
The POP3 parser stops when the end of a RETR response arrives in a later segment than the end of its counted message body. After that, no POP3 transactions are logged for the flow, and app_layer.error.pop3.parser goes up by one.
Example, one server segment per line:
The QUIT transaction is not logged. The same happens when the ".\r\n" itself is split, for example "z\r\n." followed by "\r\n". Normal traffic can hit this when a message body ends near a segment boundary.
Cause: when the counted body ends, the RETR transaction is marked complete (rust/src/pop3/pop3.rs:347) before the ".\r\n" is seen, and the bytes that follow are parsed as the start of a new response, which fails.
Fix: keep the transaction open after the body, and only look for ".\r\n" until it arrives.
Affected: main. main-8.0.x has the same code but has not been tested.
No data to display