]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Only schedule_exit() once
authorReynir Björnsson <reynir@reynir.dk>
Thu, 16 May 2024 11:58:08 +0000 (13:58 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 16 May 2024 20:32:24 +0000 (22:32 +0200)
commit65fb67cd6c320a426567b2922c4282fb8738ba3f
tree040427ef28348ab9bf5fcc351ce71fe3807f43dd
parent8aed156be81a3bdd3098bfed5e8f95662d06633c
Only schedule_exit() once

If an exit has already been scheduled we should not schedule it again.
Otherwise, the exit signal is never emitted if the peer reschedules the
exit before the timeout occurs.

schedule_exit() now only takes the context as argument. The signal is
hard coded to SIGTERM, and the interval is read directly from the
context options.

Furthermore, schedule_exit() now returns a bool signifying whether an
exit was scheduled; false if exit is already scheduled. The call sites
are updated accordingly. A notable difference is that management is only
notified *once* when an exit is scheduled - we no longer notify
management on redundant exit.

This patch was assigned a CVE number after already reviewed and ACKed,
because it was discovered that a misbehaving client can use the (now
fixed) server behaviour to avoid being disconnected by means of a
managment interface "client-kill" command - the security issue here is
"client can circumvent security policy set by management interface".

This only affects previously authenticated clients, and only management
client-kill, so normal renegotion / AUTH_FAIL ("your session ends") is not
affected.

CVE: 2024-28882

Change-Id: I9457f005f4ba970502e6b667d9dc4299a588d661
Signed-off-by: Reynir Björnsson <reynir@reynir.dk>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Message-Id: <20240516120434.23499-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28679.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 55bb3260c12bae33b6a8eac73cbb6972f8517411)
src/openvpn/forward.c
src/openvpn/forward.h
src/openvpn/push.c