0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-19 19:42:30 +02:00
openvpn/tests
Arne Schwabe 414f428fa2 Properly handle null bytes and invalid characters in control messages
This makes OpenVPN more picky in accepting control message in two aspects:
- Characters are checked in the whole buffer and not until the first
  NUL byte
- if the message contains invalid characters, we no longer continue
  evaluating a fixed up version of the message but rather stop
  processing it completely.

Previously it was possible to get invalid characters to end up in log
files or on a terminal.

This also prepares the logic a bit in the direction of having a proper
framing of control messages separated by null bytes instead of relying
on the TLS framing for that. All OpenVPN implementations write the 0
bytes between control commands.

This patch also include several improvement suggestion from Reynir
(thanks!).

CVE: 2024-5594

Reported-By: Reynir Björnsson <reynir@reynir.dk>
Change-Id: I0d926f910637dabc89bf5fa919dc6beef1eb46d9
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Antonio Quartulli <a@unstable.cc>

Message-Id: <20240619103004.56460-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28791.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2024-06-19 14:04:40 +02:00
..
unit_tests Properly handle null bytes and invalid characters in control messages 2024-06-19 14:04:40 +02:00
Makefile.am Add t_server_null test suite 2024-06-18 22:41:51 +02:00
ntlm_support.c Update Copyright statements to 2024 2024-03-18 18:46:26 +01:00
null_client_up.sh Add t_server_null test suite 2024-06-18 22:41:51 +02:00
t_client.rc-sample t_client.sh: Allow to skip tests 2024-03-08 12:27:05 +01:00
t_client.sh.in t_client.sh: Allow to skip tests 2024-03-08 12:27:05 +01:00
t_cltsrv-down.sh build: standard directory layout 2012-03-22 22:07:08 +01:00
t_cltsrv.sh tests: Allow to override openvpn binary used 2023-05-16 17:57:48 +02:00
t_lpback.sh Remove ability to use configurations without TLS by default 2023-10-13 17:52:13 +02:00
t_net.sh tests: Allow to override openvpn binary used 2023-05-16 17:57:48 +02:00
t_server_null_client.sh Add t_server_null test suite 2024-06-18 22:41:51 +02:00
t_server_null_default.rc Add t_server_null test suite 2024-06-18 22:41:51 +02:00
t_server_null_server.sh Add t_server_null test suite 2024-06-18 22:41:51 +02:00
t_server_null_stress.sh Add t_server_null test suite 2024-06-18 22:41:51 +02:00
t_server_null.rc-sample Add t_server_null test suite 2024-06-18 22:41:51 +02:00
t_server_null.sh Add t_server_null test suite 2024-06-18 22:41:51 +02:00
update_t_client_ips.sh Prevent generation of duplicate EXPECT_IFCONFIG entries 2016-11-08 15:09:52 +01:00