From: "plaisthos (Code Review)" Date: Wed, 29 Oct 2025 13:22:23 +0000 References: Reply-To: 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="bUgaIUSierQ="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: fix key_state_gen_auth_control_files probably checking file creation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld Cc: openvpn-devel --bUgaIUSierQ= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1327?usp=3Demail to review the following change. Change subject: fix key_state_gen_auth_control_files probably checking file= creation ...................................................................... fix key_state_gen_auth_control_files probably checking file creation When the auth_failed_reason_file was added, it was forgotten to also add it to the conditions that determine if the file creation was successful. Reported-by: Joshua Rogers Found-by: ZeroPath (https://zeropath.com/) Change-Id: I94d2bdd234a1c416b78924d044bf7e57f1bed8c4 Signed-off-by: Arne Schwabe --- M src/openvpn/ssl_verify.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/27/1327/1 diff --git a/src/openvpn/ssl_verify.c b/src/openvpn/ssl_verify.c index 04ef27e..446c4a7 100644 --- a/src/openvpn/ssl_verify.c +++ b/src/openvpn/ssl_verify.c @@ -992,7 +992,7 @@ const char *apf =3D platform_create_temp_file(opt->tmp_dir, "apf", &gc= ); const char *afr =3D platform_create_temp_file(opt->tmp_dir, "afr", &gc= ); - if (acf && apf) + if (acf && apf && afr) { ads->auth_control_file =3D string_alloc(acf, NULL); ads->auth_pending_file =3D string_alloc(apf, NULL); @@ -1004,7 +1004,7 @@ } gc_free(&gc); - return (acf && apf); + return (acf && apf && afr); } /** -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1327?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: master Gerrit-Change-Id: I94d2bdd234a1c416b78924d044bf7e57f1bed8c4 Gerrit-Change-Number: 1327 Gerrit-PatchSet: 1 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld --bUgaIUSierQ= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld.

plaisthos would like flichtenheld to review this change.

V= iew Change

fix key_state_gen_auth_control_files probab=
ly checking file creation

When the auth_failed_reason_file was added= , it was forgotten to also add it
to the conditions that determine if th= e file creation was successful.

Reported-by: Joshua Rogers <conta= ct@...2949...>
Found-by: ZeroPath (https://zeropath.com/)
Change-I= d: I94d2bdd234a1c416b78924d044bf7e57f1bed8c4
Signed-off-by: Arne Schwabe= <arne@...1227...>
---
M src/openvpn/ssl_verify.c
1 file cha= nged, 2 insertions(+), 2 deletions(-)

git pull s=
sh://gerrit.openvpn.net:29418/openvpn refs/changes/27/1327/1
diff -=
-git a/src/openvpn/ssl_verify.c b/src/openvpn/ssl_verify.c
= index 04ef27e..446c4a7 100644
--- a/src/openvpn/ssl_verify.= c
+++ b/src/openvpn/ssl_verify.c
@@ -992,7 = +992,7 @@
const char *apf =3D platform_create_temp_fil= e(opt->tmp_dir, "apf", &gc);
const ch= ar *afr =3D platform_create_temp_file(opt->tmp_dir, "afr", &am= p;gc);

+ if (acf && apf && afr)
= {
ads->auth_control_file =3D string_alloc(acf, = NULL);
ads->auth_pending_file =3D string_alloc(= apf, NULL);
@@ -1004,7 +1004,7 @@
}

gc_free(&gc);
- return (acf && apf);+ return (acf && ap= f && afr);
}

/*= *

To view, visit change 1327. To unsubscrib= e, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I94d2bdd234a1c416b78924d044b= f7e57f1bed8c4
Gerrit-Change-Number: 1327
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
= --bUgaIUSierQ=--