From patchwork Mon Nov 3 11:55:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4559 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7001:a40d:b0:72f:f16c:e055 with SMTP id vo13csp1351716mab; Mon, 3 Nov 2025 03:56:05 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVNX8V7T+fZBhu9UfvWOxzwyLVsLxeFMA4TOR0Nl18/lgi9IaYhs8Yq1uMrNxTaGzew94hxF2qQLgw=@openvpn.net X-Google-Smtp-Source: AGHT+IFsybQYfHTNwJIFswWYwqI30ux3AuMEfYWBIXSJRoUn1nRdmF+GfKO6P2vR0meRnEdkbMI9 X-Received: by 2002:a05:6e02:1488:b0:433:2b3f:63df with SMTP id e9e14a558f8ab-4332b3f6739mr54154215ab.28.1762170965281; Mon, 03 Nov 2025 03:56:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1762170965; cv=none; d=google.com; s=arc-20240605; b=b6YKyooAoWKux9+x9KPU5WIvXPAxcMIfF00A4WLL7BooiOpskMlz4s7Ey8SxWefB9b 6g0YNslg49vux2QxLuqwiUMSTK9KtueOHbxF6FvgBIfudLFHDj1iT4JVj0ystAwN5taH Iw4GREzwstQmf2oKatSnOdXShNpSb1fvXWp9BGFhnRuEhkXA9r1IZLojA022uvxKjwlW qaMdbIupwoeolJGLFnSi49zb8a/RNdYDsaXjkZL3jNS81JqhP6jtjr85zwyui4vfOcCV +6p2ye1oe+7cz/9V+oltT+2Xzk2dSxHaMXiU4ocsjwIHzzJEEz3XYt3dFmTtWSUXY2uw zlUw== 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=OtkEPNJqN0KZYRHo7krX1+tzaHoADywn5CZhD1zaM3M=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=fohDnDKDCKn3dhyb4plS/MvVH0XwET35IQ89TI5qgIRJULffSDI1Vh/93al2ZL6//v dYlkWw9xo6SPSgjct236b7zEN0aUnD7blAcCUaZuWybC6nVs9cstsGWTD3Ebp9wU0Upu 5iHEuxHwfjyn6xEP9/8LzMNhfMiSQbAkffH8XpxZClhAktFNH0UfgoIpmjW0cZWzlZTP 7+pce6C7G/Ci2GwzN+8/R+HVjkqBqTT0Ne8OMx1WzbmOiKNufycxaRPgo/mf1tXRSmkc gXa0FQ4qoU+MO0/OjuEfp8UQRiavhAFmZvxLRSIQJOn5e4kHC1R/QyT5SHmztFeMMyX1 JMRg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=QlKAt9K7; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=KZuGsXKF; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Nc7tOL8Q; 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 8926c6da1cb9f-5b718235617si1630345173.229.2025.11.03.03.56.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Nov 2025 03:56:05 -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=QlKAt9K7; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=KZuGsXKF; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Nc7tOL8Q; 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=OtkEPNJqN0KZYRHo7krX1+tzaHoADywn5CZhD1zaM3M=; b=QlKAt9K7DbQoJ7+pLJP/HFf72d Zu7SP/tdc0s2/IzDAWX+D0TXXRr0n6lreZ5pPnjggjjmPpIqgMoeriHzcgB62EOZ+Q9zbRg7/K/1t YC8gYNsts/uhh5OxG46gpEwpGf7NSJmWTbCHTZyPmSmGxbLPxczFUkgnLCIUJcOtCTac=; 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 ) id 1vFtAJ-0002gH-8r; Mon, 03 Nov 2025 11:56:03 +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 ) id 1vFtAH-0002g0-91 for openvpn-devel@lists.sourceforge.net; Mon, 03 Nov 2025 11:56:01 +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=Q7I8yrW+o/6hfR3So7Sb6Zcy5yrwYPPTEd12t5ZdYko=; b=KZuGsXKFzjg1Bx4B2fHWidEc+y pW3Q4U/zTs6Gtd/DL0N3sY2Awr0RnhNdTgYN5+0E/VaAd8AJ5K/nKd2FfD9kQii2Ihyeo7e74vgF+ y/Vjc1QuY79MQyooNUBXFTW98HITsFK94QtG0Vj9gOSbz9vrj6aX4LWXTGmA5SzuL5eA=; 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=Q7I8yrW+o/6hfR3So7Sb6Zcy5yrwYPPTEd12t5ZdYko=; b=Nc7tOL8QFqsJVwDZpHrGFN7xzM I0y3IWk8fjjaT2nYXDp4GpGwxUekJcnxvIPToth+v/+M2k4jj9N5F/jm7FuwnQSFdjZx2qFXymNHG 5/6B7FaT/MwTeALaI+Y6I39NIRwjz8LjWkInH8HJTkB6bhxck5iETwM2e4+K6AEjjo64=; 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 1vFtAG-0002p3-2R for openvpn-devel@lists.sourceforge.net; Mon, 03 Nov 2025 11:56:01 +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 5A3Btrnr006218 for ; Mon, 3 Nov 2025 12:55:53 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 5A3BtrQU006217 for openvpn-devel@lists.sourceforge.net; Mon, 3 Nov 2025 12:55:53 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 3 Nov 2025 12:55:46 +0100 Message-ID: <20251103115552.6201-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.1 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: Frank Lichtenheld Commit c66d433111c958c42cc98f4ba12d3cfc1bd5b3b4 introduced an off-by-one when changing a literal to a constant. Fixes: #887 Change-Id: I19373408a82332d7b2e5c634e5509c8be3727b5a Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvp [...] 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: 1vFtAG-0002p3-2R Subject: [Openvpn-devel] [PATCH v1] manage: Correctly handle port 65535 in man_kill 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?1847770182277956521?= X-GMAIL-MSGID: =?utf-8?q?1847770182277956521?= From: Frank Lichtenheld Commit c66d433111c958c42cc98f4ba12d3cfc1bd5b3b4 introduced an off-by-one when changing a literal to a constant. Fixes: #887 Change-Id: I19373408a82332d7b2e5c634e5509c8be3727b5a Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1341 --- 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/+/1341 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index e46b5f2..6efa100 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -612,7 +612,7 @@ : (streq(p1, "udp")) ? PROTO_UDP : PROTO_NONE; - if ((port > 0 && port < UINT16_MAX) && (proto != PROTO_NONE)) + if ((port > 0 && port <= UINT16_MAX) && (proto != PROTO_NONE)) { n_killed = (*man->persist.callback.kill_by_addr)(man->persist.callback.arg, addr, (uint16_t)port, proto);