From: "cron2 (Code Review)" Date: Tue, 13 Jan 2026 08:46:54 +0000 In-Reply-To: References: Reply-To: gert@...1296..., 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="2JIMNMqhcsM="; 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: , To: plaisthos Cc: flichtenheld , openvpn-devel --2JIMNMqhcsM= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/14= 65?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 Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1465 Message-Id: <20260113072750.16015-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35= 223.html Signed-off-by: Gert Doering --- M src/openvpn/tun_afunix.c 1 file changed, 4 insertions(+), 1 deletion(-) 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: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I89dcab24ba510094ce1672e382960bf15def310a Gerrit-Change-Number: 1465 Gerrit-PatchSet: 2 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel --2JIMNMqhcsM= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 sub= mitted this change.

View Change

Require script-security 2 when using unix: tun
Since this executes an executable from an arbitrary path, it should f= ollow
the same rules as other scripts/executable.

Reported-By: Pe= tr Simecek, Pavel Kohout and Stanislav Fort from Aisle Research
Change-I= d: I89dcab24ba510094ce1672e382960bf15def310a
Signed-off-by: Arne Schwabe= <arne@...1227...>
Acked-by: Frank Lichtenheld <frank@...2723...= .>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1465
Message= -Id: <20260113072750.16015-1-gert@...1296...>
URL: https://www.mai= l-archive.com/openvpn-devel@lists.sourceforge.net/msg35223.html
Signed-o= ff-by: Gert Doering <gert@...1296...>
---
M src/openvpn/tun_afu= nix.c
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/openvpn/tun_afunix.c b/src/openvpn/tun_afunix.c<=
br>index c410480..a67a472 100644
--- a/src/openvpn/tu= n_afunix.c
+++ b/src/openvpn/tun_afunix.c
@= @ -61,7 +61,10 @@

argv_printf(&a= rgv, "%s", program);

- tt->afunix.childprocess =3D openvpn_execv= e_check(&argv, env, S_NOWAITPID, msgprefix);
+ /* exit when executing fails to easier spo= t errors here and treat this
+ * command like an external script */
+ int flags =3D S_NOWAITPID | S_SCRIPT | S= _FATAL;
+ tt->a= funix.childprocess =3D openvpn_execve_check(&argv, env, flags, msgprefi= x);
if (!openvpn_waitpid_check(tt->afunix.childproc= ess, msgprefix, M_WARN))
{
tt= ->afunix.childprocess =3D 0;

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

<= div itemscope itemtype=3D"http://schema.org/EmailMessage">
<= meta itemprop=3D"name" content=3D"View Change"/>
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I89dcab24ba510094ce1672e3829= 60bf15def310a
Gerrit-Change-Number: 1465
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --2JIMNMqhcsM=--