]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Make any auth failure tls_authentication_status return auth failed
authorArne Schwabe <arne@rfc2549.org>
Fri, 23 Oct 2020 12:02:59 +0000 (14:02 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 26 Nov 2020 14:50:54 +0000 (15:50 +0100)
commit88dc4276485bf2a4cecae3cff55d2e146dcd31ca
treee0a157271f70de4f10054bee117279bedae6b358
parent55d5eaa3e021a21b9537a474c46636d4c2dcdac5
Make any auth failure tls_authentication_status return auth failed

Previously tls_authentication_status only return
TLS_AUTHENTICATION_FAILED if there is no usable key at all. This
behaviour allows continuing using the still valid keys
(see --tran-window). However, the OpenVPN protocol lacks a way of
communicating that key is not useable to client once it reached
the TLS authenticated status (eg cert checks pass but connect or
user-pass verify fail). To avoid these desynchronisation issues
during deferred auth and renegotiation OpenVPN quietly only starts
using a new key after the hand-window has passed.

With this change any failure on a renogiation will lead to a
deauthentication of a client. This also fixes a number of bugs that
expiring auth-token and failed deferred auth is leading to key desync
or unexpected continuation of the VPN session.

The behaviour of deauthentication of all keys on deferred auth failure
has been already been used for years if authentication is done via
management interface. This commit also aligns the code paths for both.

A side effect might be that we also deauth clients earlier in some
other corner cases but the behaviour of continuing using an old
authenticated session while we already a failed authentication for the
client is most times unexpected behaviour from the user (admin).

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20201023120259.29783-7-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21223.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/multi.c
src/openvpn/ssl_verify.c