From: "cron2 (Code Review)"
Date: Wed, 28 Jan 2026 13:19:15 +0000
In-Reply-To:
References:
Reply-To: gert@...1296..., arne-openvpn@...1227..., heiko@...515...,
openvpn-devel@lists.sourceforge.net
Message-ID: <56ce041b74557f8e7a5838cc0916fc4e4e0f1872-EmailReplacePatchSet-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="Yyv2U35+wm4="; charset=UTF-8
Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Prevent NULL
pointer dereference with --dns-updown
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: d12fk , plaisthos
Cc: openvpn-devel
--Yyv2U35+wm4=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
cron2 has uploaded a new patch set (#2) to the change originally created by=
d12fk. ( http://gerrit.openvpn.net/c/openvpn/+/1498?usp=3Demail )
The following approvals got outdated and were removed:
Code-Review+2 by plaisthos
Change subject: Prevent NULL pointer dereference with --dns-updown
......................................................................
Prevent NULL pointer dereference with --dns-updown
If the dns-updown option appears in the config twice, there is a chance
of a NULL pointer dereference when comparing the script path to the
default script path. This happens when a custom script is set, after the
dns-updown script was disabled first. In that case the script path is
NULL, which leads to the deref during a strcmp(3).
Reported-by:
Change-Id: Id530d890ba01cffb74d3dc04ad10b153f7bea1d4
Signed-off-by: Heiko Hund
Acked-by: Arne Schwabe
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1498
Message-Id: <20260128110443.24410-1-gert@...1296...>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35=
479.html
Signed-off-by: Gert Doering
---
M src/openvpn/options.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/98/1498/2
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 85669e0..2bca647 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -7890,7 +7890,7 @@
}
else
{
- if (streq(dns->updown, DEFAULT_DNS_UPDOWN))
+ if (dns->updown && streq(dns->updown, DEFAULT_DNS_UPDOWN))
{
/* Unset the default command to prevent warnings */
dns->updown =3D NULL;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1498?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: Id530d890ba01cffb74d3dc04ad10b153f7bea1d4
Gerrit-Change-Number: 1498
Gerrit-PatchSet: 2
Gerrit-Owner: d12fk
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
--Yyv2U35+wm4=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
cron2 upl=
oaded patch set #2 to the change originally created by d12fk.
<=
p>View C=
hange
The following approvals got outdated and were removed:
Code-Review+2 by plaisthos
Prevent NULL pointer dereferenc=
e with --dns-updown
If the dns-updown option appears in the config t=
wice, there is a chance
of a NULL pointer dereference when comparing the=
script path to the
default script path. This happens when a custom scri=
pt is set, after the
dns-updown script was disabled first. In that case =
the script path is
NULL, which leads to the deref during a strcmp(3).
Reported-by: <aarnav@...2953...>
Change-Id: Id530d890ba01cffb=
74d3dc04ad10b153f7bea1d4
Signed-off-by: Heiko Hund <heiko@...2662...&=
gt;
Acked-by: Arne Schwabe <arne-openvpn@...1227...>
Gerrit URL=
: https://gerrit.openvpn.net/c/openvpn/+/1498
Message-Id: <2026012811=
0443.24410-1-gert@...1296...>
URL: https://www.mail-archive.com/openv=
pn-devel@lists.sourceforge.net/msg35479.html
Signed-off-by: Gert Doering=
<gert@...1296...>
---
M src/openvpn/options.c
1 file change=
d, 1 insertion(+), 1 deletion(-)
git pull ssh:=
//gerrit.openvpn.net:29418/openvpn refs/changes/98/1498/2
diff --=
git a/src/openvpn/options.c b/src/openvpn/options.c
index 8=
5669e0..2bca647 100644
--- a/src/openvpn/options.c+++ b/src/openvpn/options.c
@@ -7890,7 +7890,7 @@=
span>
}
else
=
{
- if=
(streq(dns->updown, DEFAULT_DNS_UPDOWN))
+ if (dns->updown && streq(dn=
s->updown, DEFAULT_DNS_UPDOWN))
{
/* Unset the default command to prevent warnings */=
dns->updown =3D NULL;
=
To view, visit change 1498. To unsubscribe, or for help wri=
ting mail filters, visit settings.
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id530d890ba01cffb74d3dc04ad1=
0b153f7bea1d4
Gerrit-Change-Number: 1498
Gerrit-PatchSet: 2
Gerrit-Owner: d12fk <heiko@...515...> =
div>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...=
.1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
=
--Yyv2U35+wm4=--