From patchwork Wed Jan 28 11:04:19 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4738 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:8468:b0:80a:3855:ce6a with SMTP id u8csp2651071max; Wed, 28 Jan 2026 03:04:49 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVs+WepR+CmoMC3zM0GTna9mkdF+oiluuRb738VGB6qvqJCIwjvHmE89onNqb0vmNVKWtRBAbd32aQ=@openvpn.net X-Received: by 2002:a05:6808:13d5:b0:455:daf0:9998 with SMTP id 5614622812f47-45efc6a7212mr3094827b6e.41.1769598289479; Wed, 28 Jan 2026 03:04:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769598289; cv=none; d=google.com; s=arc-20240605; b=X4Q9rHZZsh+pSRV00FRaQ6b1Hlrq9wWbAXrM3p23PgojdpUkPQgb0cFNzJObpfQtS0 E03xD4PPhDSwmeYjEk4zEg99ehbdcqfYf71GfrHPxki6ias92AXDmkfKfUfoJxI/s+dN ob1KpfucfKirp42v34H7lhdSj1UrJjZXmxqzhmqTSWMXek8DJ/A5W/vcAXB+XXyuConp SZnQ/GRhlsbrLV70K1fD8nBSUR07/MVNZyuff5W/3bxEiEWnjrNaXMzLSH+EEhRL3ZKX 7T77sN2+ytPlYgPXwm2ntIqf3VUDLuxEibttYEqp70vl0Hk2IuTSfpvmNwydujzgiVX8 6j9w== 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=a6B+TiCNj3NPA6QQkkuYIIvnuDvhkbQDL3hbtg8XHro=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=ciDp9v/1VHNHpZzpA64q86WxcCqx3j4R211/5Rn70rZG+bcB4V/zLAGyr+9MEAoo32 rb6FHRwYjqDNnGPvNfLFNKRJYKB/dIfqptaLGtTagGsotAUibY6Qjj70IzWaEh8zy5P1 OEI7cPilAi5C5Fmy+jMLtNAW+nXQ6APUjKFwzAq719+IH9ueodXTIJqBok+iI3sYfoxI PNLO8LVFzjuiD7xEG++CWo5dPgrBIYJXf55EwSUMC4QV+tZ6iQTPkpbbCx8X7CGiRAuX DFc4xF37lEZahDB+CIdmYOtmPmzg7VmUnf+EbWqP4A/oAY7b/gLx9a0aXDlsE+du4QZg lcGQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=jrXo6P8R; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=U1UF2Dq9; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=XVSOffkW; 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-45f08d8e026si1257869b6e.23.2026.01.28.03.04.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Jan 2026 03:04:49 -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=jrXo6P8R; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=U1UF2Dq9; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=XVSOffkW; 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=a6B+TiCNj3NPA6QQkkuYIIvnuDvhkbQDL3hbtg8XHro=; b=jrXo6P8RbXz5Igdlr+LePYLdcd MKwGWSMI198CbQao5aK/ZIo8xCdic83o+Rq5efLpmnxMX7ZbpwJTgzxinnSex8t+98I0pz2bp4khW 7QFphe+RNzN8zKtKEM2bgRMc9xNFC1HydnnTFliHd8MQLop7HrTQ5a63rQAsvuJVBBk4=; 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.95) (envelope-from ) id 1vl3Ll-0006vC-P3; Wed, 28 Jan 2026 11:04:41 +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.95) (envelope-from ) id 1vl3Lj-0006sT-Mo for openvpn-devel@lists.sourceforge.net; Wed, 28 Jan 2026 11:04:39 +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=twX0TRVxIzdImtriiwaJrCeWxjk/ErA/b6VirkS+i40=; b=U1UF2Dq9Mi4c0/Wxafxk0k1hRa 8sL9rbxK2ClL0La9zEvEn5pKvQEoVUchZcLrnuRQ5TSwfR+Hwbk8DfTOwE+mtq56gEj2Tbp0+rlwz Cix1swJdfHziasRUiPSyd6BR32cX5Ot6qSxhieDL5NKpkVfoznGC+RL1VYt3T0ITsN5k=; 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=twX0TRVxIzdImtriiwaJrCeWxjk/ErA/b6VirkS+i40=; b=XVSOffkWgpkEnKl2QDuGUHJ2fP 0EM2ersur33JdHj3VhOahgr7E6tqXPjKyrvcdMu6ECNn+RA0mOOz7Qlv6oH/yrYHJB6JAyi1G0ED6 QegvucTz00aERZot73B+a/QW0s8pw07ie2XPOrQXGu3fIpJVTjse+JG2YLaVSTnw2lBU=; 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 1vl3Li-0000QL-DJ for openvpn-devel@lists.sourceforge.net; Wed, 28 Jan 2026 11:04:39 +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 60SB4QBC024368 for ; Wed, 28 Jan 2026 12:04:26 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 60SB4QWs024367 for openvpn-devel@lists.sourceforge.net; Wed, 28 Jan 2026 12:04:26 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Wed, 28 Jan 2026 12:04:19 +0100 Message-ID: <20260128110425.24350-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.51.2 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-2.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: On a full SIGUSR1 restart of a p2mp server compiled with --enable-async-push, tunnel_server() will try to close and reopen the "inotify" control file descriptor. For whatever reason, the original code [...] 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: 1vl3Li-0000QL-DJ Subject: [Openvpn-devel] [PATCH v1] tunnel_server(): close correct inotify fd 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: =?utf-8?q?1855558295980877040?= X-GMAIL-MSGID: =?utf-8?q?1855558295980877040?= On a full SIGUSR1 restart of a p2mp server compiled with --enable-async-push, tunnel_server() will try to close and reopen the "inotify" control file descriptor. For whatever reason, the original code referenced the wrong context, always closing fd 0. As a consequence of this, on the second SIGUSR1 restart, the server will close() the first active socket file descriptor, and if there are active DCO clients, the resulting event confusion will lead to an ASSERT(!mi->halt). Fix by closing the correct FD. Add logging. Github: fixes OpenVPN/openvpn#966 Change-Id: Iabc117848ad7b67d240c392f1a6aa2d7531fd5bb Signed-off-by: Gert Doering Acked-by: Arne Schwabe Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1497 --- 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/+/1497 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 2af49d2..8f903a4 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -4244,7 +4244,9 @@ tunnel_server_loop(&multi); #ifdef ENABLE_ASYNC_PUSH - close(top->c2.inotify_fd); + msg(D_LOW, "%s: close multi.top.c2.inotify_fd (%d)", + __func__, multi.top.c2.inotify_fd ); + close(multi.top.c2.inotify_fd); #endif /* shut down management interface */