From patchwork Sun Nov 23 11:37:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4622 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:6c3:b0:7b1:439f:bdf with SMTP id j3csp1263443maw; Sun, 23 Nov 2025 03:38:01 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUJstMMZvIxp6xffUfuTcwDmp+0JxuaOcFB4F0MHdVH2bfsMjGSQG45PvtNc/fDC0jaDEw2ZeRYobw=@openvpn.net X-Google-Smtp-Source: AGHT+IHFzQ79Rh3d0kOLezB5anJ2A4n3wv9J0l9ZOuYtRfVM0AWL9QZhzTKfQ8JjGZaNl89fwXFG X-Received: by 2002:a05:6870:1694:b0:3cd:a995:6c6 with SMTP id 586e51a60fabf-3ecbe2e3864mr3882211fac.13.1763897881070; Sun, 23 Nov 2025 03:38:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1763897881; cv=none; d=google.com; s=arc-20240605; b=f030N3Nm5c8Kh7QK7/hddVvHd10N0pd2WTpyz60IIXsZ/9PoY+RMJ7MbWjrc+dN5lA oNWw+qNrMC0lF5B0VCSrA9LnCss2euJc0epKmeKrGt4ufBU2NeN8fPekVZ7rUWzDfdNN NFw5Nh7941TqC5AjyRiIrWWimYrotRTPq/4aXTZdIGkRZH4jkn5efjYwoWSy06UBTCYA 9Apw8M9WEP7ie49VYgukDpFB3HfXTg2mGGmirlCELhwWuq+qZRzCAr2blDcoHBQRzdon 4vHPPDNfFS4kp0rpdmqrzG1FeqOxMTTQJPd2/q/VeS0L697lA901nDv9RoYw/TxFNgId jpYA== 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=GsKRebGFR7kKpyshCfHFnekQDcv9q8uA1eLiXLWAVZE=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=Z+Q4jJwOlG3Ff3019tHo8yZ7oesUmskV9bTiNVV+NgD4djlUk6vvy8/EC7LWGTJ3L6 q6xP6XOqYli+ZmmKIaHWoh35MD+8VFuCJnQTxQj0v5whLm5lrKlBP50xULEJ1ZmETNha yhUustrFv3Bw+VcS87zICh+e15GuMb2snt0po7pAuF/GjL7obB+ejLW9VAVA6YLw5VR7 LLPCJBtIsXagjYTY/fwL9n6Vvk32clol2tAdVIUx3rflZbh1TgtcHEOqowhRRVbfeEvA OjMoSfhVhqytuFj4Ki0vqAo9rcOtnZA90Estyj+/emEe9djTKaeymlYKlPLZj/rjfueS 9slQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=lZ5hCRUl; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="e/1JxUDi"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="f4/utf+D"; 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 586e51a60fabf-3eca1b64d80si1817711fac.1173.2025.11.23.03.38.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Nov 2025 03:38:01 -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=lZ5hCRUl; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="e/1JxUDi"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="f4/utf+D"; 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=GsKRebGFR7kKpyshCfHFnekQDcv9q8uA1eLiXLWAVZE=; b=lZ5hCRUllnG0qMI6CMgAJwnfRX /OIeEfLXSe7HkWNNxpnJEGZo1uM4PeUPdJ/q8/294j4nLiCSS0+67IBIeM1eFutcCZNSFyq3n/Nl5 xpNXu/OJz7w2Z6mfikZS+HP+w86UZcvMuL4XOII9B+LuwuV3b60HYOBh9wNX8H9FgjmU=; 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 1vN8Pm-0006oE-Gm; Sun, 23 Nov 2025 11:37:58 +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 1vN8Pk-0006o6-CA for openvpn-devel@lists.sourceforge.net; Sun, 23 Nov 2025 11:37:56 +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=WqEzWBydalXs+ShDnYJf+jZ2JQWuyxryXYzyyrgwoUM=; b=e/1JxUDiUjL9fKFC0/0Xk62NGr 0xFLlofO1SuzcE8zHZVsPcHhoWVIDnXHdICgiPjLpBcVY3Z0MEuc8+aD/51YssfUpO9azFzsVj3Iq igpJykjlh6c+wSIvoLkzjsbZy3db2WzdvPu5awUvHZxACuSWoEdn9WN+3jKhwRrUJi7k=; 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=WqEzWBydalXs+ShDnYJf+jZ2JQWuyxryXYzyyrgwoUM=; b=f4/utf+DJ7paR0aQiNmMJjOpd9 1YCH+2y8bI7W9KpN2MrtENAuYmT9fovwF9d/HcMpm63pRRDuxduXI+4paKHAJYQJoRYf5zcQkdKEB uLoGMR+Sp1xbzkxxtx7xh3aIePgoI9ujYIJvQc9jj5UF2dU5OY7z3WFiX6FV8Rx49F3s=; 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 1vN8Pj-0007MP-7e for openvpn-devel@lists.sourceforge.net; Sun, 23 Nov 2025 11:37:56 +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 5ANBbmiZ017755 for ; Sun, 23 Nov 2025 12:37:48 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 5ANBbmVB017754 for openvpn-devel@lists.sourceforge.net; Sun, 23 Nov 2025 12:37:48 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sun, 23 Nov 2025 12:37:42 +0100 Message-ID: <20251123113747.17739-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-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: Heiko Hund GetItfDnsDomains expects a non-zero size buffer to return the domains in. Check for the size as well, not just for a valid pointer. Change-Id: I8b26c65415f5a751f416d80a22cbb7ff14aa27c0 Reported-by: Marc Heuse Reported-by: stephan@srlabs.de Signed-off-by: Heiko Hund Acked-by: Gert Doering [...] 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: 1vN8Pj-0007MP-7e Subject: [Openvpn-devel] [PATCH v1] iservice: make sure buffer size is not zero 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?1849580984444418175?= X-GMAIL-MSGID: =?utf-8?q?1849580984444418175?= From: Heiko Hund GetItfDnsDomains expects a non-zero size buffer to return the domains in. Check for the size as well, not just for a valid pointer. Change-Id: I8b26c65415f5a751f416d80a22cbb7ff14aa27c0 Reported-by: Marc Heuse Reported-by: stephan@srlabs.de Signed-off-by: Heiko Hund Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1389 --- 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/+/1389 This mail reflects revision 1 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 f64c247..d778e89 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -2149,7 +2149,7 @@ static LSTATUS GetItfDnsDomains(HKEY itf, PCWSTR search_domains, PWSTR domains, PDWORD size) { - if (domains == NULL || size == 0) + if (domains == NULL || size == NULL || *size == 0) { return ERROR_INVALID_PARAMETER; }