From: "cron2 (Code Review)" Date: Tue, 28 Oct 2025 12:18:17 +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="3jaWTN1O6Sk="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Add ASSERT to afunix code that dev_node is always set up the way we e... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --3jaWTN1O6Sk= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#3) to the change originally created by= plaisthos. ( http://gerrit.openvpn.net/c/openvpn/+/1320?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: Add ASSERT to afunix code that dev_node is always set up th= e way we expect ...................................................................... Add ASSERT to afunix code that dev_node is always set up the way we expect The calling code only calls tun_afunix_exec_child if is_tun_afunix is true, which checks that the path is having unix: as prefix. But since adding an ASSERT here to ensure that it is really the case does not cost us anything, just add the ASSERT. Reported-By: Joshua Rogers Found-By: Zeropath Change-Id: Idbb7bf279eb467fc1d56ab75a50b5eb2c8d0a57e Signed-off-by: Arne Schwabe Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1320 Message-Id: <20251028115953.22487-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg33= 934.html Signed-off-by: Gert Doering --- M src/openvpn/tun_afunix.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/20/1320/3 diff --git a/src/openvpn/tun_afunix.c b/src/openvpn/tun_afunix.c index 124db6d..42bcd0d 100644 --- a/src/openvpn/tun_afunix.c +++ b/src/openvpn/tun_afunix.c @@ -53,6 +53,8 @@ const char *msgprefix =3D "ERROR: failure executing process for tun:"; struct argv argv =3D argv_new(); + /* we should always called with a proper unix: dev node string */ + ASSERT(dev_node && strncmp(dev_node, "unix:", strlen("unix:")) =3D=3D = 0); /* since we know that dev-node starts with unix: we can just skip that * to get the program name */ const char *program =3D dev_node + strlen("unix:"); -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1320?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: master Gerrit-Change-Id: Idbb7bf279eb467fc1d56ab75a50b5eb2c8d0a57e Gerrit-Change-Number: 1320 Gerrit-PatchSet: 3 Gerrit-Owner: plaisthos Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel --3jaWTN1O6Sk= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #3 to the change originally created by plaisthos.<= /p>

Vi= ew Change

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

Add ASSERT to afunix code that dev_=
node is always set up the way we expect

The calling code only calls = tun_afunix_exec_child if is_tun_afunix is true,
which checks that the pa= th is having unix: as prefix.

But since adding an ASSERT here to ens= ure that it is really the case
does not cost us anything, just add the A= SSERT.

Reported-By: Joshua Rogers <contact@...2949...>
Foun= d-By: Zeropath

Change-Id: Idbb7bf279eb467fc1d56ab75a50b5eb2c8d0a57e<= br>Signed-off-by: Arne Schwabe <arne-openvpn@...1227...>
Acked-by:= Gert Doering <gert@...1296...>
Gerrit URL: https://gerrit.openvpn= .net/c/openvpn/+/1320
Message-Id: <20251028115953.22487-1-gert@...1826...= 6...>
URL: https://www.mail-archive.com/openvpn-devel@...1768...= ge.net/msg33934.html
Signed-off-by: Gert Doering <gert@...1296...>=
---
M src/openvpn/tun_afunix.c
1 file changed, 2 insertions(+), 0= deletions(-)

git pull ssh://gerrit.openvpn.net:=
29418/openvpn refs/changes/20/1320/3
diff --git a/src/openvpn/tun_a=
funix.c b/src/openvpn/tun_afunix.c
index 124db6d..42bcd0d 1= 00644
--- a/src/openvpn/tun_afunix.c
+++ b/= src/openvpn/tun_afunix.c
@@ -53,6 +53,8 @@
= const char *msgprefix =3D "ERROR: failure executing process for t= un:";
struct argv argv =3D argv_new();
=
+ /* we sh= ould always called with a proper unix: dev node string */
+ ASSERT(dev_node && strncm= p(dev_node, "unix:", strlen("unix:")) =3D=3D 0);=
/* since we know that dev-node starts with unix: we can just= skip that
* to get the program name */
const char *program =3D dev_node + strlen("unix:");

To view, visit change 1320. To unsubscribe, or f= or help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Idbb7bf279eb467fc1d56ab75a50= b5eb2c8d0a57e
Gerrit-Change-Number: 1320
Gerrit-PatchSet: 3
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --3jaWTN1O6Sk=--