| Message ID | 20251027213308.5588-1-gert@greenie.muc.de |
|---|---|
| State | New |
| Headers | show
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:7000:2995:b0:72f:f16c:e055 with SMTP id
f21csp1667999max;
Mon, 27 Oct 2025 14:33:21 -0700 (PDT)
X-Forwarded-Encrypted: i=2;
AJvYcCVE5gXZYHT5MMwDaXoT5pXXqYSqULiud39u7b+8UVb5XdH+JUmlSIKuRSCRm6zhn7oFW578htYrjt8=@openvpn.net
X-Google-Smtp-Source:
AGHT+IF/J1MykpPi24UGIGU7EhwQMo/WaE2CKwRx9CHRgyduaJ7qblgDkMCCrbHvefdlQv2z0ox2
X-Received: by 2002:a05:6602:6b07:b0:93e:7d6d:e0d0 with SMTP id
ca18e2360f4ac-945b819ed4emr233336739f.6.1761600800900;
Mon, 27 Oct 2025 14:33:20 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1761600800; cv=none;
d=google.com; s=arc-20240605;
b=iDeEq0+kAtAb67fq4WBC1RIC8jKKaibJvOET3vy+6/QAZTdPRp8iwyD1f/CcVOz1zT
sT4jk92iTmdNRO+hmy/PBgfar3y6QcIdabWe6TyNO6TCjjWDzbuI6WcEAT0jlaFpm4JU
Y6J8v9+7I/W7o5pHviLjLDwlk3xuhNGgruELTBWPvFGoc6sMVwkxJLdYjpUGhXoCCTiV
tWu1EKv0lVsliIfN7P0JhAApEWumvL9SRRVKFsm7VKQcPchpDdt4Oz+ugv9TTkI4jlC+
lxummadUibA3UWfTOubzt8o7pn4i4fNkdPJv7NmV+lkgJ23oQkWCwyrpYv2F0QViU5yy
uRjw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=errors-to:content-transfer-encoding:list-subscribe:list-help
:list-post:list-archive:list-unsubscribe:list-id:precedence:subject
:mime-version:references:in-reply-to:message-id:date:to:from
:dkim-signature:dkim-signature:dkim-signature;
bh=KpCeQFXtjDHD/AnQ/4/h1Kz+dxwJVluhfRe152D4TV0=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=Zl5jjA/+FEW2V9yooH8tOoGvInMOfOjsuvk63mLXz1MUwbo8m0iFxW4WBz98Jjruki
ozXLqPBAJ1C1RPMaBi/sMxami62kE/8Hs5YcRUMMUgB6sd5BQITWV3gDxWzJ1haYfRmL
xwttkkmtNYMEKhtxYTTJFAZamyNqSvH8sGhoXG+t+yWtbm0wjBwN+RivhX0ONWxY63KI
ZLx860VoQQGJnMNDpz1DqFLRI+nywI3KBJZ1vQpfQmnMsI0lKvLWIgLQHkOAx84zWB3a
gjKsRGfz1CsFggfLKsP3aJK3BpGfzF4mpjHs8Q5lz/fRzxwp8uD8sp4g58KMC0wpVTP2
XfBQ==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=JhrLosIq;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=dLrhk7SF;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=MZJuaAdX;
spf=pass (google.com: domain of
openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as
permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net;
dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de
Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7])
by mx.google.com with ESMTPS id
ca18e2360f4ac-9435c7ee9edsi541383539f.301.2025.10.27.14.33.20
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Mon, 27 Oct 2025 14:33:20 -0700 (PDT)
Received-SPF: pass (google.com: domain of
openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as
permitted sender) client-ip=216.105.38.7;
Authentication-Results: mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=JhrLosIq;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=dLrhk7SF;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=MZJuaAdX;
spf=pass (google.com: domain of
openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as
permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net;
dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:
List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:
Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender:
Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;
bh=KpCeQFXtjDHD/AnQ/4/h1Kz+dxwJVluhfRe152D4TV0=; b=JhrLosIqfCf+NAw5mcwZmyPyD0
1g4ZeO39HPwFkly0oJO3t1lOErqx4+be9xKIb2KTG69oDP9eEsgyEawzuo99dkkwgoQwa58ZgX4h7
gdspj7yBRSdgp+dZ/QxvgCu+VsleRsy7RZvlzzAVcyB/kMVF/dG0XnWCfH0x6ZMxEyns=;
Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com)
by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1vDUq6-00031J-AD;
Mon, 27 Oct 2025 21:33:18 +0000
Received: from [172.30.29.66] (helo=mx.sourceforge.net)
by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95)
(envelope-from <gert@blue4.greenie.muc.de>) id 1vDUq4-00031C-Go
for openvpn-devel@lists.sourceforge.net;
Mon, 27 Oct 2025 21:33:16 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References:
In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=NurD0gA0F5ZJFrZbCF4rJoMq3Y3mk9AR7sHpSfIYpvs=; b=dLrhk7SF5rviqry/OMiyVpp+/T
jpxRg1P7p8xnGvb2qfW+6tBIpoFgNnIiQdQD5DsHlVPmgwXWif+P6kAYuKEtSwd5uhsZps7YDVsnZ
WCeVDYhrjadD1Xm51SfBd6/zPa5dvlNIOsVxaLpj+KMvtPP42DCmRbqUNNAdZPp1/7lM=;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x
;
h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:
Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
List-Post:List-Owner:List-Archive;
bh=NurD0gA0F5ZJFrZbCF4rJoMq3Y3mk9AR7sHpSfIYpvs=; b=MZJuaAdXhjHk8Z7tnuoXj9dpRi
YfHVG4gzAFc/unijV7E2pFM4fLXeES4zrc7lLfGte3SKOsTo17YRE/ywaMoqq5C5ZUS9PUS+etL+Z
L6XmRrKZ7TtcJaSmtJNY1inUbIjPZfzIZggOeaG4DeagHYCNCTeUgzvFiGBEmhpplt/A=;
Received: from [193.149.48.134] (helo=blue.greenie.muc.de)
by sfi-mx-2.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95)
id 1vDUq3-0005tV-JQ for openvpn-devel@lists.sourceforge.net;
Mon, 27 Oct 2025 21:33:16 +0000
Received: from blue.greenie.muc.de (localhost [127.0.0.1])
by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 59RLX9d3005610
for <openvpn-devel@lists.sourceforge.net>; Mon, 27 Oct 2025 22:33:09 +0100
Received: (from gert@localhost)
by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 59RLX9Zs005609
for openvpn-devel@lists.sourceforge.net; Mon, 27 Oct 2025 22:33:09 +0100
From: Gert Doering <gert@greenie.muc.de>
To: openvpn-devel@lists.sourceforge.net
Date: Mon, 27 Oct 2025 22:33:02 +0100
Message-ID: <20251027213308.5588-1-gert@greenie.muc.de>
X-Mailer: git-send-email 2.49.1
In-Reply-To:
<gerrit.1761599429000.I7b94de92723f9528b01cb932bb079eedf0f1f272@gerrit.openvpn.net>
References:
<gerrit.1761599429000.I7b94de92723f9528b01cb932bb079eedf0f1f272@gerrit.openvpn.net>
MIME-Version: 1.0
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software,
running on the system "sfi-spamd-1.hosts.colo.sdot.me",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: From: Arne Schwabe <arne@rfc2549.org> If for whatever reason
the child pid is zero, we would kill ourselves since killing 0 means killing
the own process group. Reported-By: contact@joshua.hu Found-By: Zeropath
Change-Id: I7b94de92723f9528b01cb932bb079eedf0f1f272 Signed-off-by: Arne
Schwabe
<arne-openvpn@rfc2549.org> Acked-by: Gert Doering <gert@greenie.muc.d [...]
Content analysis details: (1.3 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
X-Headers-End: 1vDUq3-0005tV-JQ
Subject: [Openvpn-devel] [PATCH v1] Avoid possible race condition that kill
OpenVPN itself
X-BeenThere: openvpn-devel@lists.sourceforge.net
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <openvpn-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel>
List-Post: <mailto:openvpn-devel@lists.sourceforge.net>
List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: openvpn-devel-bounces@lists.sourceforge.net
X-getmail-retrieved-from-mailbox: Inbox
X-GMAIL-THRID: =?utf-8?q?1847172321454085411?=
X-GMAIL-MSGID: =?utf-8?q?1847172321454085411?=
|
| Series |
[Openvpn-devel,v1] Avoid possible race condition that kill OpenVPN itself
|
expand
|
diff --git a/src/openvpn/tun_afunix.c b/src/openvpn/tun_afunix.c index 4d48a31..124db6d 100644 --- a/src/openvpn/tun_afunix.c +++ b/src/openvpn/tun_afunix.c @@ -128,7 +128,12 @@ close(tt->fd); tt->fd = 0; } - kill(tt->afunix.childprocess, SIGINT); + /* only kill the child process if the PID is not 0 to avoid killing + * ourselves by accident */ + if (tt->afunix.childprocess) + { + kill(tt->afunix.childprocess, SIGINT); + } free(tt->actual_name); free(tt);