From: "syzzer (Code Review)" Date: Sun, 26 Oct 2025 14:32:58 +0000 References: Reply-To: steffan@...1856..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="JWEC7ubf/LQ="; 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: plaisthos , flichtenheld Cc: openvpn-devel --JWEC7ubf/LQ= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1305?usp=3Demail to review the following change. 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 --- 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/1 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: newchange Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: I5b6881dc73358c8d1249ee2ceb968ede295105b0 Gerrit-Change-Number: 1305 Gerrit-PatchSet: 1 Gerrit-Owner: syzzer Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld --JWEC7ubf/LQ= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld, plaisthos.

syzzer would like plaisthos and flichtenheld to review = this change.

V= iew Change

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
erro= r paths of ssl_mbedtls.c.

Move an existing perf_pop call a bit upwar= ds to fix that.

The perf code is always disabled by ENABLE_PERFORMAN= CE_METRICS being
commented out in perf.h. There is no configure flag. No= ne of the active
developers remembers using it and the git log shows no = actual code changes
since at least the project structure overhaul of 201= 2. So this has no
real-world impact.

Change-Id: I5b6881dc73358c8d= 1249ee2ceb968ede295105b0
Signed-off-by: Steffan Karger <steffan@...1883...= 56...>
---
M src/openvpn/ssl_mbedtls.c
1 file changed, 1 insert= ion(+), 1 deletion(-)

git pull ssh://gerrit.open=
vpn.net:29418/openvpn refs/changes/05/1305/1
diff --git a/src/openv=
pn/ssl_mbedtls.c b/src/openvpn/ssl_mbedtls.c
index 8fb69c3.= .2862989 100644
--- a/src/openvpn/ssl_mbedtls.c
<= span>+++ 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_WAN= T_READ =3D=3D retval)
{
= return 0;
}
mbed_log_e= rr(D_TLS_ERRORS, retval, "TLS_ERROR: read tls_read_plaintext error&quo= t;);
buf->len =3D 0;
- perf_pop();
ret= urn -1;
}
/* Nothing read, try ag= ain */

To view, visit change 1305. To unsub= scribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: I5b6881dc73358c8d1249ee2ceb9= 68ede295105b0
Gerrit-Change-Number: 1305
Gerrit-PatchSet: 1
Gerrit-Owner: syzzer <steffan@...1856...>= ;
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
= --JWEC7ubf/LQ=--