Bug #9515
openpop3: parser stops when a status line is split across segments
Description
If the first line of a POP3 server response arrives in two TCP segments, the parser stops for the rest of the flow. No more POP3 transactions are logged, and app_layer.error.pop3.parser goes up by one.
Example, one server segment per line:
LIST is logged without a response and QUIT is not logged. The same response in one segment is parsed normally.
Cause: find_end_of_header (rust/src/pop3/pop3.rs:151-155) returns Needed::Unknown when the line has no CRLF yet. parse_response only waits for more data on Needed::Size and returns an error otherwise (rust/src/pop3/pop3.rs:466-473).
Fix: wait for more data when the line has no CRLF yet, and cap the line at 512 octets including the CRLF (RFC 2449 section 4), raising an event and stopping when a line is longer.
Affected: main. main-8.0.x has the same code but has not been tested.
No data to display