]> 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)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 26 Apr 2019 15:28:42 +0000 (18:28 +0300)
commite9d60648abb9bbceff89882a5309cb9532e702e9
treeecceff5a88d7f65809eea81de14417b26643aa9f
parentf79745dae4a9a5fca33320e03a4fc9064b88d01e
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