From patchwork Mon Jul 14 14:20:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sabrina Dubroca X-Patchwork-Id: 4306 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:8e92:b0:671:5a2c:6455 with SMTP id kd18csp1371299mab; Mon, 14 Jul 2025 07:36:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUyE9/U8LBRuttmJPXtY3IV9A7b7oM0/Zy7G8FM+iwRg3yszLMP/1DdnLmdCRn5+B55/Q1SdL4koPg=@openvpn.net X-Google-Smtp-Source: AGHT+IGFmntjWuDkXS21XMJ6c5aBWRLUVpp6HhP9kCRqJsjYQ/XuPKwJ33KSGLKSmttbuualmt0p X-Received: by 2002:a05:6808:4a47:20b0:41b:2d22:4fd6 with SMTP id 5614622812f47-41b2d22571bmr536258b6e.20.1752503787572; Mon, 14 Jul 2025 07:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1752503787; cv=none; d=google.com; s=arc-20240605; b=QU/p6q68CS37d6ylzj7seWHPJRqGPzQm0DncsIobbmBN47RYI6cHWWLsTJ/k+HgNxw IyJHppGuCwTLF7JQf3ymKeSHAEaCAk9wrYoQmltOArPACXBiGbL2Exj9xdkkjfiOJNXk nLMFOK+HjpBXKfqsZVeRjKn0jkbUEYsIGHpUThvNdTmKwP2ewdd/9mCqhcE2Xzmo9liX RVRdi5NVOoXZCj6aK4YvlUwWxgGia567DTNMt+X8u9NXfA+qEXGZo3RK8eEDkrqNMQFe g8HWuMPQHjszMuSNKNn7riSKLOHPqtbAZg/yKa0ZBFRBXeZR7YE6REOr8qbIJ3YO2A/+ ebqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:cc:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:feedback-id:dkim-signature :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=q6fzzRolItUUMfrgZ3FFs4sDpxwuMFsFZW20VeiwADY=; fh=BRD5nlWz8Dao7r6wQQa6hXD4f3uQGq0bfdeuHf+OsGo=; b=IY7Va9cxUBWcNq2spTSpMHaUd2qOjO97+UaTE5mhofPOP8xev9htipyqPuFynWEl1+ Hm7SXtJlkKDM5N6VNqnnUg+85QmwIEePXlFBtIfZzkIbF1AZz0KeVoVJmKUsUU65erln onfyDjr0rmFb6VYNXoeu6QOzCHo+F0c3UM9XDEGPE33w4r/Oy29Gqypg5OIOCMyKnSXT +f+IIKUX5ZmdzSJF3KfxP41vtXqoj7vlvH0ac/65GBFce3KKBNseyExj1odFMRHXtwg7 sV7Jciqit7foIupuxDodJ5tAZeZLM7MjfusSo+dubj4zdkvMwq4HpJnvxVro3s85QiY4 9o9A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Eusto4wK; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=SMTdBq6X; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=gxf04Ybl; dkim=neutral (body hash did not verify) header.i=@queasysnail.net header.s=fm3 header.b=M75zx3L5; dkim=neutral (body hash did not verify) header.i=@messagingengine.com header.s=fm2 header.b="cGM/Q9dd"; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 5614622812f47-4141c77a756si5235371b6e.236.2025.07.14.07.36.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Jul 2025 07:36:27 -0700 (PDT) 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=Eusto4wK; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=SMTdBq6X; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=gxf04Ybl; dkim=neutral (body hash did not verify) header.i=@queasysnail.net header.s=fm3 header.b=M75zx3L5; dkim=neutral (body hash did not verify) header.i=@messagingengine.com header.s=fm2 header.b="cGM/Q9dd"; 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 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:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:Message-ID:Date:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=q6fzzRolItUUMfrgZ3FFs4sDpxwuMFsFZW20VeiwADY=; b=Eusto4wKmqT32j1HI3QqsNizYm 4paS94FashRxCc84jfHIqlYgjBaTf2vSULalD3GB8HinLrKrsRLc/i5gLuY4B2mcyoIo/VlBZO4Mx qQ1cLhCWlt4cFTEhFmec1cAgljOwpLJHFD1yt+zNBcL4StRRcF0ZwDdNeNk+sd19CuoI=; 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 1ubKI2-0007JX-8U; Mon, 14 Jul 2025 14:36:22 +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 1ubKI0-0007JN-Ly for openvpn-devel@lists.sourceforge.net; Mon, 14 Jul 2025 14:36:21 +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:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pJ13UM6PTRkci5WIBnxzB8PEDv8m3mqDmLFnoD80v7Q=; b=SMTdBq6X9rZw/k1vSsq1AX9gfp +AT/WxHYgaPV9jjnMWMx2yRQ/c2aF4zP4am5WAJmm66HtXyZGbGa3spk/MBHFFxRb7n+/J5rSMw/o ghJ/U3J08/igQ4Qgju8hsxfs0LPbt7tunUdNsayaFEVad0MAsnBfi+KQ2OlO9HyG53p4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=pJ13UM6PTRkci5WIBnxzB8PEDv8m3mqDmLFnoD80v7Q=; b=g xf04YblrUvQ7cQIH19Q7yr/SeQfCboX6jEosCSPpPP1nTj5bHVx3DTzyQyYD1aOjIfypHtGk78MFL 1ZD/M1XrZsX3McItg/j9/iRsejQRZ5qTIyFzQUr/9t/O/hT8fTp69wLiJsRahz6tCeSvsUkw5aCOz fWuxNB8zYpYdl0SU=; Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1ubKHz-0000ax-GL for openvpn-devel@lists.sourceforge.net; Mon, 14 Jul 2025 14:36:20 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 7AD9A1D00316; Mon, 14 Jul 2025 10:20:08 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 14 Jul 2025 10:20:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=queasysnail.net; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm3; t=1752502808; x=1752589208; bh=pJ13UM6PTR kci5WIBnxzB8PEDv8m3mqDmLFnoD80v7Q=; b=M75zx3L5xGvNO+troOpa//bSWr ESjEOfwqdIyfqU4CqkstMl2Mr1qHCn6j22aKtMZdH4YTAxwRfezHj+ZmHwERqTn6 eLWZ1s7sy1jky4JgxCJq41ZWUezlZ0WBZzWaVSnNMYpgiLH72fEwmYlEXyUVk5nL zJtUnFLwumRA69nBYJdvJMUw4AltDAWCUtBBehrQxNWvgPizjo2WW9vc7vgugJJA Y96bmcCuYIyFVPxlBCib3YzvUHzURLd9wToIsrTtngAuzGGw/wqWzGtmlCV/vvfD PihY24cM498PUe9Idwb36CxDfJPQVCLccCSE/UHlbtV/Fb2Io2b5bOdoP+bA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1752502808; x=1752589208; bh=pJ13UM6PTRkci5WIBnxzB8PEDv8m3mqDmLF noD80v7Q=; b=cGM/Q9dd8WPovpXLW6m/ZBQXZt3vKGyKQ3+Gi2CwDjb8hVHIESA Tn2Hr9Ax9lX8yEQ41ucwaHPg/GjVJP4YLMepvkzVMaOO+QOP/ERBK1h4CVYNr+GS vYHE1CRH1H/LFw1K4NnKQno83Zs8OTlIrHYUIP3ecpEhJMVfNr0mhUYebw3lpWuE iP0AsdxJaAF2Gw24kgprMDOilUXQCzxUyABxgj9Kdj3lHjtIZL7tpwMMtGoya5Qx 2l+8k5TqfCF5BvFTpGdFJXmfTZ0pqWplonuPJ3Xl0ogdNi+1XXKo0+u1khKlLnNv 9xHYVMC3xBdbP+jBEgoK6WvEulVV1UvgRxg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdehvddukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefurggsrhhinhgrucff uhgsrhhotggruceoshgusehquhgvrghshihsnhgrihhlrdhnvghtqeenucggtffrrghtth gvrhhnpeejtdeugfffkeejfeehkeeiiedvjeehvdduffevfeetueffheegteetvdfhffev ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsug esqhhuvggrshihshhnrghilhdrnhgvthdpnhgspghrtghpthhtohepfedpmhhouggvpehs mhhtphhouhhtpdhrtghpthhtohepohhpvghnvhhpnhdquggvvhgvlheslhhishhtshdrsh houhhrtggvfhhorhhgvgdrnhgvthdprhgtphhtthhopehsugesqhhuvggrshihshhnrghi lhdrnhgvthdprhgtphhtthhopegrnhhtohhnihhosehophgvnhhvphhnrdhnvght X-ME-Proxy: Feedback-ID: i934648bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Jul 2025 10:20:07 -0400 (EDT) From: Sabrina Dubroca To: openvpn-devel@lists.sourceforge.net Date: Mon, 14 Jul 2025 16:20:02 +0200 Message-ID: X-Mailer: git-send-email 2.50.0 MIME-Version: 1.0 X-Spam-Score: -0.2 (/) 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: In ovpn_nl_key_swap_doit, the attributes array used to parse the OVPN_A_KEYCONF uses OVPN_A_PEER_MAX instead of OVPN_A_KEYCONF_MAX. Note that this does not cause any bug, since currently OVPN_A_KEYCON [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-Headers-End: 1ubKHz-0000ax-GL Subject: [Openvpn-devel] [PATCH ovpn] net: ovpn: use correct array size to parse nested attributes in ovpn_nl_key_swap_doit 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: , Cc: Antonio Quartulli , Sabrina Dubroca Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1837633411669211344?= X-GMAIL-MSGID: =?utf-8?q?1837633411669211344?= In ovpn_nl_key_swap_doit, the attributes array used to parse the OVPN_A_KEYCONF uses OVPN_A_PEER_MAX instead of OVPN_A_KEYCONF_MAX. Note that this does not cause any bug, since currently OVPN_A_KEYCONF_MAX < OVPN_A_PEER_MAX. Fixes: 203e2bf55990 ("ovpn: implement key add/get/del/swap via netlink") Signed-off-by: Sabrina Dubroca --- This patch is not urgent since the array ends up being too big for our needs, so there is no bug. drivers/net/ovpn/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ovpn/netlink.c b/drivers/net/ovpn/netlink.c index a4ec53def46e..655f9d674d57 100644 --- a/drivers/net/ovpn/netlink.c +++ b/drivers/net/ovpn/netlink.c @@ -1027,7 +1027,7 @@ int ovpn_nl_key_get_doit(struct sk_buff *skb, struct genl_info *info) int ovpn_nl_key_swap_doit(struct sk_buff *skb, struct genl_info *info) { struct ovpn_priv *ovpn = info->user_ptr[0]; - struct nlattr *attrs[OVPN_A_PEER_MAX + 1]; + struct nlattr *attrs[OVPN_A_KEYCONF_MAX + 1]; struct ovpn_peer *peer; u32 peer_id; int ret;