From patchwork Fri Nov 13 19:26:48 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5691 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:18c:b0:11a:a05e:cb97 with SMTP id 12csp672230lag; Fri, 13 Nov 2026 11:27:12 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErHClybNs9B7vrOwKylmk7g2eZ4ry0ObcaPHziXMxcamKKR5CX761CEW6ifheGOQzAL/C1JJt4JrWvY=@openvpn.net X-Received: by 2002:a05:6808:2f0f:b0:4e8:18ee:eb4d with SMTP id 5614622812f47-56e63ba571bmr2890040b6e.20.1794598031850; Fri, 13 Nov 2026 11:27:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794598031; cv=none; d=google.com; s=arc-20260327; b=N1w4fFK4ZSyjN90CzrnAyD/IiBMYd91se0s29UJ/kK96diiIIu6TzFkfj9LtE4kL06 Wnk/pXqaSFhRyxnhEu7+aOHCJdybVFt7kPriigZfIy11EJDvC/49QZJGreiZfnT1gPui aLRmw7xbQowAq4zV2xvG6hlVkwWU8l52RQ7A3J7p25wHzUenKadB3prELtvn/GsBoI1I tcu17rGYFVwFFyfVwadGKfbQlZd4hLw241nJvX7jyjWPHJfUVq/DHZc1opjOZ0it5mCl cUOA5qDQ0CLrfgWub0Nnc1wTUh1tsTa1aGXMGhyGMALXtjbnoBYtIijvRkCo5jSvBCZm OcCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; 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=4xRLJPs5cb9jQG2CXVT7/aRTN6v1EYw6whYG+p6pnPc=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=ZRaYPugPopWJGWbjsQ5qNxh5H8qWVps1XVA0q3Xbp+ZxPR/IJchZTeE6BzFtJdFfem fcyWwPvkiRXgpIE73cHqoJYKCIlgmnqY3DKZYNIFD1FmfG8f/lbjxOR0Rtus1FidDfT/ R6YLYEUj2s1znoBKwA/FNzoXX+sX8srAynNUxd+wWRUlxOEYzzAkTUtILUZL1fUjB0qp 0+ZYoNcqWVItzDF8+6HQlUqfqo7OAQXgWoo/mwS7TNV0UWgd/fwJ0OK4C53ScyhmOnmM 7GpuDqdbNNB+9ZTRN+Dkz0zUDF4mslOXenFhsmVPXKwhdIj1TnqrDo1bfL31uYHrwucY ZU4Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Ffam38g7; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Gf1YAAW6; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=PvCvsMmY; 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 5614622812f47-56e7256f444si4919256b6e.115.2026.11.13.11.27.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Nov 2026 11:27:11 -0800 (PST) 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=Ffam38g7; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Gf1YAAW6; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=PvCvsMmY; 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-Unsubscribe-Post: List-Owner; bh=4xRLJPs5cb9jQG2CXVT7/aRTN6v1EYw6whYG+p6pnPc=; b=Ffam38g7YCG6Uo U/nJm7Q5Bg4ERbwQmM9JHBbCQbHBv34+P0QwWvR/F/db27s3Grh9omHh/7W4RX3FTTBLliM0iCXUn qQqEj+17GwCxEHHkMS1gAZL6KwdfXqjnR431pbe8Yr8RKr7/rAT7yje4ZzwstSEkwMm7QQTZdvfqx mTo=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.100.1) (envelope-from ) id 1xRwvR-000000006rX-3ATf; Fri, 13 Nov 2026 19:27:05 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xRwvQ-000000006rR-0d49 for openvpn-devel@lists.sourceforge.net; Fri, 13 Nov 2026 19:27:04 +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-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zairybfA9aDxaaAD3IO3EMYa7S0qLWQDiw8n9WrFzW4=; b=Gf1YAAW68JuPk7cRvWmmzmhmVW a25+HojEWnOnIQg6lA6fCVyLOpKEcfWz2uu6vSs2wINggGQiaU8OrTLgjMCowxPDhwL7hBgyHzPer dHVp3o9N5R/iQK3bsA0X7eqf6CDxk2Lrs0BhcvrXWN+5seVlUDA5uN5/pMBv4CheoQLE=; 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-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zairybfA9aDxaaAD3IO3EMYa7S0qLWQDiw8n9WrFzW4=; b=PvCvsMmYF4tDK7y1i94aTrpLk2 a6MeTpOX6AnL2FxZ/mwXvEaUv7F+W8RIStcD+/DjDjiLFil10arKygOaNbjkcKWUuRIIF9wZ7pmb+ 7h6Pklbbpeg6twUV7lJY7g7OjtT763JCYF0yeViPJK4Iv8Kff1XU9t27RPgFMWxsRKj0=; Received: from [193.149.48.129] (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.100.1) id 1xRwvO-000000002Z9-09Ed for openvpn-devel@lists.sourceforge.net; Fri, 13 Nov 2026 19:27:04 +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 6ADJQsP1011352 for ; Fri, 13 Nov 2026 20:26:54 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6ADJQswQ011351 for openvpn-devel@lists.sourceforge.net; Fri, 13 Nov 2026 20:26:54 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 13 Nov 2026 20:26:48 +0100 Message-ID: <20261113192654.11321-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: 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: Razvan Cojocaru With --persist-tun, do_open_tun() frees the old tuntap struct but not its actual_name, leaking it on every reconnect. Change-Id: I1295d911c993a02397565e26cece0f0861a2e5f8 Signed-off-by: Razvan Cojocaru Acked-by: Antonio Quartulli Gerrit URL: https://gerrit.openvpn.net/c/o [...] 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: 1xRwvO-000000002Z9-09Ed Subject: [Openvpn-devel] [PATCH v1] init: free actual_name when replacing the Android tuntap X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: 1881772425758389219 X-GMAIL-MSGID: 1881772425758389219 From: Razvan Cojocaru With --persist-tun, do_open_tun() frees the old tuntap struct but not its actual_name, leaking it on every reconnect. Change-Id: I1295d911c993a02397565e26cece0f0861a2e5f8 Signed-off-by: Razvan Cojocaru Acked-by: Antonio Quartulli Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2171 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2171 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Antonio Quartulli diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 3bc4de4..6664a4d 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -1845,6 +1845,7 @@ if (c->c1.tuntap) { oldtunfd = c->c1.tuntap->fd; + free(c->c1.tuntap->actual_name); free(c->c1.tuntap); c->c1.tuntap = NULL; c->c1.tuntap_owned = false;