From: "cron2 (Code Review)" Date: Mon, 27 Oct 2025 10:02:43 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., steffan@...1856... Message-ID: <24746e81776da03e2aae165321d0e4f15f57fd91-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="WxEkiFYTbRQ="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[release/2.6]: ssl_mbedtls: fix missing perf_pop() call List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: syzzer , plaisthos , flichtenheld Cc: openvpn-devel --WxEkiFYTbRQ= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= syzzer. ( http://gerrit.openvpn.net/c/openvpn/+/1305?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: ssl_mbedtls: fix missing perf_pop() call ...................................................................... ssl_mbedtls: fix missing perf_pop() call This was triggered by a bug report submitted by Joshua Rogers, who used ZeroPath to discover we missed a perf_pop() call in one of the error paths of ssl_mbedtls.c. Move an existing perf_pop call a bit upwards to fix that. The perf code is always disabled by ENABLE_PERFORMANCE_METRICS being commented out in perf.h. There is no configure flag. None of the active developers remembers using it and the git log shows no actual code changes since at least the project structure overhaul of 2012. So this has no real-world impact. Change-Id: I5b6881dc73358c8d1249ee2ceb968ede295105b0 Signed-off-by: Steffan Karger Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1305 Message-Id: <20251026143521.13291-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg33= 870.html Signed-off-by: Gert Doering --- M src/openvpn/ssl_mbedtls.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/05/1305/2 diff --git a/src/openvpn/ssl_mbedtls.c b/src/openvpn/ssl_mbedtls.c index 8fb69c3..2862989 100644 --- a/src/openvpn/ssl_mbedtls.c +++ b/src/openvpn/ssl_mbedtls.c @@ -1489,13 +1489,13 @@ /* Error during read, check for retry error */ if (retval < 0) { + perf_pop(); if (MBEDTLS_ERR_SSL_WANT_WRITE =3D=3D retval || MBEDTLS_ERR_SSL_WA= NT_READ =3D=3D retval) { return 0; } mbed_log_err(D_TLS_ERRORS, retval, "TLS_ERROR: read tls_read_plain= text error"); buf->len =3D 0; - perf_pop(); return -1; } /* Nothing read, try again */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1305?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: I5b6881dc73358c8d1249ee2ceb968ede295105b0 Gerrit-Change-Number: 1305 Gerrit-PatchSet: 2 Gerrit-Owner: syzzer Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --WxEkiFYTbRQ= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #2 to the change originally created by syzzer.

=

View = Change

The following approvals got outdated and were removed: Code-Review+2 by cron2

ssl_mbedtls: fix missing perf_pop()=
 call

This was triggered by a bug report submitted by Joshua Rogers,= who
used ZeroPath to discover we missed a perf_pop() call in one of the=
error paths of ssl_mbedtls.c.

Move an existing perf_pop call a b= it upwards to fix that.

The perf code is always disabled by ENABLE_P= ERFORMANCE_METRICS being
commented out in perf.h. There is no configure = flag. None of the active
developers remembers using it and the git log s= hows no actual code changes
since at least the project structure overhau= l of 2012. So this has no
real-world impact.

Change-Id: I5b6881dc= 73358c8d1249ee2ceb968ede295105b0
Signed-off-by: Steffan Karger <steff= an@...1856...>
Acked-by: Gert Doering <gert@...1296...>
Gerr= it URL: https://gerrit.openvpn.net/c/openvpn/+/1305
Message-Id: <2025= 1026143521.13291-1-gert@...1296...>
URL: https://www.mail-archive.com= /openvpn-devel@lists.sourceforge.net/msg33870.html
Signed-off-by: Gert D= oering <gert@...1296...>
---
M src/openvpn/ssl_mbedtls.c
1 f= ile changed, 1 insertion(+), 1 deletion(-)

git p=
ull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/05/1305/2
d= iff --git a/src/openvpn/ssl_mbedtls.c b/src/openvpn/ssl_mbedtls.cindex 8fb69c3..2862989 100644
--- a/src/openvpn/ssl_= mbedtls.c
+++ b/src/openvpn/ssl_mbedtls.c
@= @ -1489,13 +1489,13 @@
/* Error during read, check for= retry error */
if (retval < 0)
= {
+ perf_pop= ();
if (MBEDTLS_ERR_SSL_WANT_WRITE =3D=3D retval |= | MBEDTLS_ERR_SSL_WANT_READ =3D=3D retval)
{
return 0;
}
mbed_log_err(D_TLS_ERRORS, retval, "TLS_ERROR: read tls_rea= d_plaintext error");

buf->len =3D 0;
- perf_pop();<= br> return -1;
}
/*= Nothing read, try again */

To view, vi= sit chan= ge 1305. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: I5b6881dc73358c8d1249ee2ceb9= 68ede295105b0
Gerrit-Change-Number: 1305
Gerrit-PatchSet: 2
Gerrit-Owner: syzzer <steffan@...1856...>= ;
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --WxEkiFYTbRQ=--