From: "plaisthos (Code Review)" Date: Mon, 12 Jan 2026 14:10:17 +0000 References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="+Mgweqgr3M4="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Require script-security 2 when using unix: tun List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openvpn-devel --+Mgweqgr3M4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable plaisthos has uploaded this change for review. ( http://gerrit.openvpn.net/= c/openvpn/+/1465?usp=3Demail ) Change subject: Require script-security 2 when using unix: tun ...................................................................... Require script-security 2 when using unix: tun Since this executes an executable from an arbitrary path, it should follow the same rules as other scripts/executable. Reported-By: Petr Simecek, Pavel Kohout and Stanislav Fort from Aisle Resea= rch Change-Id: I89dcab24ba510094ce1672e382960bf15def310a Signed-off-by: Arne Schwabe --- M src/openvpn/tun_afunix.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/65/1465/1 diff --git a/src/openvpn/tun_afunix.c b/src/openvpn/tun_afunix.c index c410480..a67a472 100644 --- a/src/openvpn/tun_afunix.c +++ b/src/openvpn/tun_afunix.c @@ -61,7 +61,10 @@ argv_printf(&argv, "%s", program); - tt->afunix.childprocess =3D openvpn_execve_check(&argv, env, S_NOWAITP= ID, msgprefix); + /* exit when executing fails to easier spot errors here and treat this + * command like an external script */ + int flags =3D S_NOWAITPID | S_SCRIPT | S_FATAL; + tt->afunix.childprocess =3D openvpn_execve_check(&argv, env, flags, ms= gprefix); if (!openvpn_waitpid_check(tt->afunix.childprocess, msgprefix, M_WARN)) { tt->afunix.childprocess =3D 0; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1465?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: I89dcab24ba510094ce1672e382960bf15def310a Gerrit-Change-Number: 1465 Gerrit-PatchSet: 1 Gerrit-Owner: plaisthos Gerrit-CC: openvpn-devel --+Mgweqgr3M4= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

plaisthos has upl= oaded this change for review.

View Change

Require script-security 2 when using unix: tun

Since this execut= es an executable from an arbitrary path, it should follow
the same rules= as other scripts/executable.

Reported-By: Petr Simecek, Pavel Kohou= t and Stanislav Fort from Aisle Research
Change-Id: I89dcab24ba510094ce1= 672e382960bf15def310a
Signed-off-by: Arne Schwabe <arne@...1227...>= ;
---
M src/openvpn/tun_afunix.c
1 file changed, 4 insertions(+), = 1 deletion(-)

git pull ssh://gerrit.openvpn.net:=
29418/openvpn refs/changes/65/1465/1
diff --git a/src/openvpn/tun_a=
funix.c b/src/openvpn/tun_afunix.c
index c410480..a67a472 1= 00644
--- a/src/openvpn/tun_afunix.c
+++ b/= src/openvpn/tun_afunix.c
@@ -61,7 +61,10 @@

argv_printf(&argv, "%s", program);

- tt= ->afunix.childprocess =3D openvpn_execve_check(&argv, env, S_NOWAITP= ID, msgprefix);
+ = /* exit when executing fails to easier spot errors here and treat this
+ * command like an e= xternal script */
+ = int flags =3D S_NOWAITPID | S_SCRIPT | S_FATAL;
+ tt->afunix.childprocess =3D openvpn_ex= ecve_check(&argv, env, flags, msgprefix);
if (!ope= nvpn_waitpid_check(tt->afunix.childprocess, msgprefix, M_WARN)) {
tt->afunix.childprocess =3D 0;

To view, visit change 1465. To unsubscribe, = or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I89dcab24ba510094ce1672e3829= 60bf15def310a
Gerrit-Change-Number: 1465
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --+Mgweqgr3M4=--