From patchwork Thu Mar 5 08:46:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4802 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7001:a68f:b0:83c:d90d:321 with SMTP id wf15csp720921mab; Thu, 5 Mar 2026 00:46:23 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW3TMFe6+GQB+qJXQDyiLuh7ZDIHMbBQhuUBpmQtDmj9ooer6lj9YhMhknFSs1YWYI+T7ndJZ637zg=@openvpn.net X-Received: by 2002:a05:6830:90e:b0:7c7:2c63:f2d6 with SMTP id 46e09a7af769-7d6d1259b6emr4711450a34.11.1772700383047; Thu, 05 Mar 2026 00:46:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772700383; cv=none; d=google.com; s=arc-20240605; b=bdnHy9kPO9ewEzWjzruHOH1lcYF0RuJmiCAc+qgDcPnlFYbLtnjsXc+uHLIwASAqGp fRhdM2cllvUcbehBOiT7SKgP2BRJoOOhRtjmG7TtLkKE7MxFH7b7/MEmn3bIeSEr2mZI wsn/Hl9gvw6rpjwg3vBGE1tV7HZANEM5vQeB/TxCGgCrrmGqT71zkYkav9FV4qkQSX2f Pp31+CNjVIRFpVqm3TPkG0CSXTiEIRhJLo2rqzXNJL06UDJlQczmNzCvlqAtHy5DUxbA EireoOyYl9CyFFOSY53E78JqZfJJQrjaQz+06//pDunw5tuotwmKZyxUQxyfS74vRA48 lhUw== 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=P7qhKhwhEXz/PMUlguAwiePSQqjWhyzs3o4o539mpKE=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=MjQxq0RNp8oB9JftZESym6JBsjZWq2b3+ZXbQwJ4qv1tptB3N2teN9zkUi8qC0K5Tj 4dljQJExe9XtIZvAMQophukc/tNkEtemgluKehts+XaOMbZukWedlJz2W5lvEw/j+jc8 lb5GPgSU/lf27qy5ByCP6yN/7Gv2wfC7q/eZsbDiCwc1BqE6m1ovfQBM9dqndt/FYCxt ZVVB3WwhRIhlaEbkw5YC4vstBdcJZshwXlkqGWXLa/JXI9JgGxypr8sywpdLDdqoFDln Nh5ejtC4zQwqC67q1PDc3l+2Vt85RoJrdTKTScO6XqXmqAsfNWfKOfD5FGSWgZpT8Nru l6rw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=khNiOpvN; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=WyA9M54S; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Xwg4QfZX; 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 46e09a7af769-7d58644d47dsi13375770a34.18.2026.03.05.00.46.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2026 00:46:23 -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=khNiOpvN; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=WyA9M54S; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Xwg4QfZX; 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=P7qhKhwhEXz/PMUlguAwiePSQqjWhyzs3o4o539mpKE=; b=khNiOpvN16dy8+2jyiyrHYJ7aF BXTPnkoGbbaLkTZU/XH+TEgvWyNpHkT+Mr/VZFQRDRdyT3Eq3LAXr7I9g6Uhu4HGbKcUZvVhy4OTy FeJGD5uuHYiJNBp2EbjIBscbaQ9Fpz2gw+YJWjjkroXBZZHw9p5UsmDU+CZCcBKUBNR0=; Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vy4Lb-0007Hv-JI; Thu, 05 Mar 2026 08:46:20 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vy4LZ-0007Hf-Vi for openvpn-devel@lists.sourceforge.net; Thu, 05 Mar 2026 08:46:18 +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=PKE4264IIeqVLLgm3isKAKabXlNukqmtMLWn7nB4YiI=; b=WyA9M54Susm/tzN45/jlmlNNtN xrVDQgD2btYa1cUkoNWrMy0rZsqIO2Z0tmvUnPtuEvSah2WIFZ3N7LRgF7jhqJAk+j3jvnis2/ZG1 invwy6SmudGcPs5mihNbcTP6AVMwP3pqOnZjPUWF7j1dwErcs2TpV6gbVoJ1ht2nj5zs=; 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=PKE4264IIeqVLLgm3isKAKabXlNukqmtMLWn7nB4YiI=; b=Xwg4QfZXZhX4x95/NCA4XdX5h6 XuOF9PibngyxV+yA/+IbOJTBk7sgM4SYX6+hK1KVeR1PfUy/9kvQ53TvgMwvFTPOh0kNrLYSDUlJY pMICRsL8eYI2nrmNsCU9pJ/NqrjBR2Q8sv0k+c0d7cLNBYQT7eDxamtQJRgNyC0mWh3Q=; 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.95) id 1vy4LZ-0001gE-8M for openvpn-devel@lists.sourceforge.net; Thu, 05 Mar 2026 08:46:18 +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 6258kAkj001056 for ; Thu, 5 Mar 2026 09:46:10 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 6258kAfk001055 for openvpn-devel@lists.sourceforge.net; Thu, 5 Mar 2026 09:46:10 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Thu, 5 Mar 2026 09:46:04 +0100 Message-ID: <20260305084610.1038-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.52.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-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: From: Frank Lichtenheld Handle the case where the int is negative explicitly. Zero is probably a safer value to assume in this case. Change-Id: I03f4c640a2adbea9bbb6f6334f12375041ec429c Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/open [...] 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: 1vy4LZ-0001gE-8M Subject: [Openvpn-devel] [PATCH v5] openvpnserv: Improve sanity check for addr_len in HandleWINSConfigMessage 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?1858811076849876985?= X-GMAIL-MSGID: =?utf-8?q?1858811076849876985?= From: Frank Lichtenheld Handle the case where the int is negative explicitly. Zero is probably a safer value to assume in this case. Change-Id: I03f4c640a2adbea9bbb6f6334f12375041ec429c Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1496 --- 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/+/1496 This mail reflects revision 5 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 227431a..09c709e 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -1247,11 +1247,6 @@ return err; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-compare" -#endif - /** * Check for a valid search list in a certain key of the registry * @@ -2944,7 +2939,11 @@ int addr_len = msg->addr_len; /* sanity check */ - if (addr_len > _countof(msg->addr)) + if (addr_len < 0) + { + addr_len = 0; + } + if ((unsigned int)addr_len > _countof(msg->addr)) { addr_len = _countof(msg->addr); } @@ -3005,10 +3004,6 @@ return err; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - static DWORD HandleEnableDHCPMessage(const enable_dhcp_message_t *dhcp) {