]> git.ipfire.org Git - thirdparty/openvpn.git/commit
ssl: Ignore hard reset packets with a non-zero packet id master
authorFrank Lichtenheld <frank@lichtenheld.com>
Fri, 31 Jul 2026 11:45:54 +0000 (13:45 +0200)
committerGert Doering <gert@greenie.muc.de>
Fri, 31 Jul 2026 12:49:58 +0000 (14:49 +0200)
commitd1e67f419f1ea9121d44fa4b91c59e7209785e57
treef0f910d197ba000244052c46dd5e0cf9b84da3c4
parentd9ae1f0fa43f8ac2551f048f90f37a110a9ecaa4
ssl: Ignore hard reset packets with a non-zero packet id

A hard reset is always the first packet of a session, so it always
carries reliable packet id 0. tls_process_state() relies on that when it
treats a received reset as the early negotiation packet only for packet
id 0, and the stateless three-way handshake relies on it as well (see
the comment in session_skip_to_pre_start()).

A reset claiming a different id is therefore bogus.

We had a bug that could cause hard reset replays with packet id 1 in
specific scenarios (P2P TCP). In that case we accepted the packet id
at face value and then ignored the control packet that actually had
id 1 as an replay. This caused a difficult to diagnose dead connection
that was stuck just before TLS negotiation. The check added handles
this specific scenario well in that we just ignore the bogus reset
but do not abort the connection attempt. Starting fresh might retrigger
the bug. If there would be a separate bug where the client only sends
hard resets with packet id 1 we will still get logging on the server
side now.

Change-Id: I3c7d1f9e5b2a4c6d8e1f3a5b7c9d2e4f6a8b1c3d
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1832
Message-Id: <20260731114605.11596-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg38098.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/ssl.c