]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-ssl-iostream: Fix potential busy loop when handshake has failed
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 24 Oct 2025 09:32:41 +0000 (12:32 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 24 Oct 2025 09:38:42 +0000 (12:38 +0300)
commitea080c1778fa1bd3b7da0fb10edc7220b50e8612
tree4ec01cb9fa1a05f06a02204ba3a4bb0cd8081c31
parent2e0808045ffffac792498b422ef8f22bd980192d
lib-ssl-iostream: Fix potential busy loop when handshake has failed

If the stream is already destroyed, handshaking should return -1 as error
instead of "more data needed".

This fixes at least a potential busy loop when login-proxy tries to connect
to a remote server with mismatching SSL certificate name. It was timing
sensitive though, only seeming to happen when running with valgrind.

This code has been there since 9d0640616c30701bed286034840facfb386db90e
src/lib-ssl-iostream/iostream-openssl.c