| Message ID | 20260421055357.21708-1-gert@greenie.muc.de |
|---|---|
| State | New |
| Headers | show |
| Series | [Openvpn-devel,v1] Mbed TLS: Error out if we have no valid tls-groups | expand |
Haven't tested this, but the change is quite obvious, and it's only
error handling in a particular niche case, so "reasonably safe".
Your patch has been applied to the master branch.
I'm not sure we need or want this in release/2.7 - you or Arne tell me ;-)
commit b2e3e0f0cf21a712b96efb8c053b740ca1947f54 (master)
Author: Max Fillinger
Date: Tue Apr 21 07:53:50 2026 +0200
Mbed TLS: Error out if we have no valid tls-groups
Signed-off-by: Max Fillinger <maximilian.fillinger@sentyron.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1633
Message-Id: <20260421055357.21708-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36699.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
Hi, On Mon, Apr 27, 2026 at 05:11:59PM +0200, Gert Doering wrote: > Haven't tested this, but the change is quite obvious, and it's only > error handling in a particular niche case, so "reasonably safe". > > Your patch has been applied to the master branch. > > I'm not sure we need or want this in release/2.7 - you or Arne tell me ;-) > > commit b2e3e0f0cf21a712b96efb8c053b740ca1947f54 (master) > Author: Max Fillinger > Date: Tue Apr 21 07:53:50 2026 +0200 > > Mbed TLS: Error out if we have no valid tls-groups Arne told me, so here we are... commit 573ccf82e90f03de3d65fb26aac9310a25c3e4ec (release/2.7) Author: Max Fillinger <maximilian.fillinger@sentyron.com> Date: Tue Apr 21 07:53:50 2026 +0200 Mbed TLS: Error out if we have no valid tls-groups gert
diff --git a/src/openvpn/ssl_mbedtls.c b/src/openvpn/ssl_mbedtls.c index 85c771a..8a0f7d2 100644 --- a/src/openvpn/ssl_mbedtls.c +++ b/src/openvpn/ssl_mbedtls.c @@ -450,6 +450,12 @@ } } + /* Check if any groups were valid. */ + if (i == 0) + { + msg(M_FATAL, "Error: All groups in \"%s\" are invalid or unsupported.", groups); + } + /* Recent mbedtls versions state that the list of groups must be terminated * with 0. Older versions state that it must be terminated with MBEDTLS_ECP_DP_NONE * which is also 0, so this works either way. */