Skip to contentSkip to conversation

Ensure tls session is authenticated before sending push reply

PATCH In review Arne Schwabe 2 participants 2 messages Jun 24, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Ensure tls session is authenticated before sending push reply

We ensure here that the tls session is authenticated before sending a push_reply

This a part of to fix CVE-2020-15078 in the master branch.

---
 src/openvpn/push.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/openvpn/push.c +2 -1
index b6f1252d2..b27f401e1 100644
@@ -863,7 +863,8 @@ process_incoming_push_request(struct context *c)
         send_auth_failed(c, client_reason);
         ret = PUSH_MSG_AUTH_FAILURE;
     }
-    else if (c->c2.tls_multi->multi_state >= CAS_CONNECT_DONE)
+    else if (tls_authentication_status(c->c2.tls_multi) == TLS_AUTHENTICATION_SUCCEEDED
+        && c->c2.tls_multi->multi_state >= CAS_CONNECT_DONE)
     {
         time_t now;
 
Signature · 1 line
2.32.0
Acked-by on v1 1/1
#1 lore raw

For whatever reason, this particular code path escaped previous patches, so now it's fixed as well. And verified - even with the previous 3 patches (and I was sure I had seen it fixed!) sometimes I hit the "PUSH_REPLY sent too fast" thing. Now, gone.

Not tested on the client side (this is server-only code).

Server side test rig succeeded. Since this is a fairly isolated change, verifying that PUSH_REQUEST/PUSH_REPLY still works was easy (but tested all of it, for good measure).

Your patch has been applied to the master branch.

commit 87c8c081d5a1ede46b3cb01e0c25a876441f074b

Author: Arne Schwabe
Date:   Thu Jun 24 15:08:40 2021 +0200
     Ensure tls session is authenticated before sending push reply

     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg22587.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering