]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-smtp: smtp-server-cmd-auth - Fix AUTH response error handling so that it stops...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Thu, 25 Apr 2019 07:51:32 +0000 (09:51 +0200)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Thu, 25 Apr 2019 08:31:43 +0000 (10:31 +0200)
commit0877ea52536f183a8b7c0b5fc6d068a7d830d94e
tree3aa95e78721ca468199004a3875982005caf36ec
parent0937c31f713383b980e0c4fc156c3132f63e3c94
lib-smtp: smtp-server-cmd-auth - Fix AUTH response error handling so that it stops reading more input.

Otherwise, it may try to read more data from the stream as the next AUTH
response, which causes an assert crash in the command parser later on. Even when
the parser finds no input from the stream, it will advance its state
towards AUTH response parsing, which is a problem when the next command is
subsequently being parsed.

Panic was:

Panic: file smtp-command-parser.c: line 438 (smtp_command_parse_next): assertion failed: (!parser->auth_response || parser->state.state == SMTP_COMMAND_PARSE_STATE_INIT || parser->state.state == SMTP_COMMAND_PARSE_STATE_ERROR)
src/lib-smtp/smtp-server-cmd-auth.c