From: "selvanair (Code Review)" Date: Mon, 3 Nov 2025 14:39:48 +0000 References: Reply-To: selva.nair@...277..., 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="pSHJbNHzhBA="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: openvpnserv: Disallow stdin as config unless user is authorized List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --pSHJbNHzhBA= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1343?usp=3Demail to review the following change. Change subject: openvpnserv: Disallow stdin as config unless user is author= ized ...................................................................... openvpnserv: Disallow stdin as config unless user is authorized Reported by: Change-Id: I356faeebfade1eed9b40d6700b13621c357ec5ac Signed-off-by: Selva Nair --- M src/openvpnserv/validate.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/43/1343/1 diff --git a/src/openvpnserv/validate.c b/src/openvpnserv/validate.c index 2187fb5..ddaa381 100644 --- a/src/openvpnserv/validate.c +++ b/src/openvpnserv/validate.c @@ -68,6 +68,11 @@ const WCHAR *config_file =3D NULL; WCHAR config_dir[MAX_PATH]; + /* fname =3D stdin is special: do not treat it as a relative path */ + if (wcscmp(fname, L"stdin") =3D=3D 0) + { + return FALSE; + } /* convert fname to full path */ if (PathIsRelativeW(fname)) { -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1343?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: I356faeebfade1eed9b40d6700b13621c357ec5ac Gerrit-Change-Number: 1343 Gerrit-PatchSet: 1 Gerrit-Owner: selvanair Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld --pSHJbNHzhBA= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld, plaisthos.

selvanair would like plaisthos and flichtenheld to review this change.

V= iew Change

openvpnserv: Disallow stdin as config unles=
s user is authorized

Reported by: <stephan@...2953...>

= Change-Id: I356faeebfade1eed9b40d6700b13621c357ec5ac
Signed-off-by: Selv= a Nair <selva.nair@...277...>
---
M src/openvpnserv/validate.c<= br>1 file changed, 5 insertions(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/43/1343/1<=
/pre>
+    /* fname =3D=
 stdin is special: do not treat it as a relative path */
+ if (wcscmp(fname, L"stdin&quo= t;) =3D=3D 0)
+ {<= /span>
+ return FALSE= ;
+ }
/* convert fname to full path */

if (PathIsRe= lativeW(fname))
{

= To view, visit change 1343. To unsubscribe, or for help writing mail filters, v= isit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I356faeebfade1eed9b40d6700b1= 3621c357ec5ac
Gerrit-Change-Number: 1343
Gerrit-PatchSet: 1
Gerrit-Owner: selvanair <selva.nair@...1354...= ..>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
= --pSHJbNHzhBA=--