From: "cron2 (Code Review)" Date: Tue, 28 Oct 2025 11:59:31 +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="frsVQBGeDiU="; 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 --frsVQBGeDiU= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld. cron2 has uploaded a new patch set (#2) to the change originally created by= plaisthos. ( http://gerrit.openvpn.net/c/openvpn/+/1320?usp=3Demail ) 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 --- 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/2 diff --git a/src/openvpn/tun_afunix.c b/src/openvpn/tun_afunix.c index 4d48a31..e6f2be1 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: 2 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld --frsVQBGeDiU= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld.

cron2 uploaded patch set #2 to the change originally cr= eated by plaisthos.

View Change

Add ASSERT to afunix cod=
e 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, jus= t add the ASSERT.

Reported-By: Joshua Rogers <contact@...2949...&= gt;
Found-By: Zeropath

Change-Id: Idbb7bf279eb467fc1d56ab75a50b5e= b2c8d0a57e
---
M src/openvpn/tun_afunix.c
1 file changed, 2 insert= ions(+), 0 deletions(-)

git pull ssh://gerrit.op=
envpn.net:29418/openvpn refs/changes/20/1320/2
diff --git a/src/ope=
nvpn/tun_afunix.c b/src/openvpn/tun_afunix.c
index 4d48a31.= .e6f2be1 100644
--- a/src/openvpn/tun_afunix.c
+++ b/src/openvpn/tun_afunix.c
@@ -53,6 +53,8 @@=
const char *msgprefix =3D "ERROR: failure executing pro= cess for tun:";
struct argv argv =3D argv_new();<= /span>

+ = /* we should always called with a proper unix: dev node string */<= br>+ ASSERT(dev_node &&a= mp; strncmp(dev_node, "unix:", strlen("unix:")) =3D=3D = 0);
/* since we know that dev-node starts with unix: w= e can just skip that
* to get the program name */
const char *program =3D dev_node + strlen("unix:&quo= t;);

To view, visit change 1320. To unsubsc= ribe, or for 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: 2
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...>
= --frsVQBGeDiU=--