]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Handle connecting clients without NCP or OCC without crashing.
authorGert Doering <gert@greenie.muc.de>
Mon, 13 Jul 2020 09:32:52 +0000 (11:32 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 13 Jul 2020 09:45:02 +0000 (11:45 +0200)
commitb15fcceb1dd8b4fc2bf89deff94832f2654c3ac3
tree24d52d001248f649fe63ad1851c47cb72c8be5aa
parent6168f53d6b7274026d4f392a22e64524a9b264d6
Handle connecting clients without NCP or OCC without crashing.

ssl_ncp.c:ncp_get_best_cipher() would crash if a client connects without
NCP (or with a NCP cipher list that does not contain the first NCP cipher
in the server list) due to a NULL pointer strcmp().

Work around / fix by just assigning an empty string to remote_cipher here
("not NULL but will never match either").

Add new warning message in multi.c for the "we do not know what the
client can do" case (no NCP and non-helpful OCC), rewrapped the existing
message to keep line lenght limit.

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