[Openvpn-devel,v1] Mark buffer invalid with username mismatch in server side float

Message ID 20261028121516.2361-1-gert@greenie.muc.de
State New
Headers
Series [Openvpn-devel,v1] Mark buffer invalid with username mismatch in server side float |

Commit Message

Gert Doering Oct. 28, 2026, 12:15 p.m. UTC
  From: Arne Schwabe <arne@rfc2549.org>

Commit d42a9912c1 introduced a check to ensure that also the username
is identical for floats and not only the certificate. This check did
not mark the buffer as invalid in those cases like the certificate
check.

Reported-By: QiuYiati on https://github.com/OpenVPN/openvpn/issues/1137

GitHub: closes OpenVPN/openvpn#1137
Change-Id: Ide5a3064e51d4a22f914e76c1d8165fdd4d005f4
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Razvan Cojocaru <razvanc@mailbox.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2058
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2058
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Razvan Cojocaru <razvanc@mailbox.org>
  

Patch

diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index e302a81..caee3ff 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -3172,6 +3172,7 @@ 
         {
             msg(D_MULTI_LOW, "Disallow float/connect to an address taken by another client %s",
                 multi_instance_string(ex_mi, false, &gc));
+            mi->context.c2.buf.len = 0;
             goto done;
         }
     }