From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796389339; b=xcB4oMEcRHyK9uZGBi6gUeIOjHDPPok1bXwFQaokyOawJxkaLbaTYLRmQuofn/YUjUr4 g6XgDh+91Zey2cEk/pfrm2Jv0h1QaZOw40BHDouJL4taeK1cuYRBlrwBSuJjSh5MxWauA pwOBPboM8JdPJXxaWKxBdK1f6TnIh5f+weapDJiHtq+Git1X07DBUl3mJC/dEnahWDqE2 r2a0VzETgz5OsjqnMBMiQUU09MYcrhfVxtyid3Sh+jXk/vfl3DOjcDz366d7X8asI0SRN vIbdR5RdUElaerCSzkvog4QB7k6y2OvoMF+yX0MY00xp0Ct9vw73o5HXdUQHDmgIWcQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796389339; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=qmmqD5/mzm0X5n93fVTU4e9NJ4SNR43zMU6c9BnWc10=; b=YKWY+442oaDGKYf40jtwGsR6VBuj65qWUj8G36Ezxjj+DRr6JVXAsxFxFnYPNK9K51EW q74nE2+/Xh7itB478To9PJ6j3mgmVoBN+OjXCMHQp6Adf0XGKaVUqK+4vwUNA5W1LYqyo IxlpiWrRKtGV+q+wnhSQfv5eRulwQAluOevbOGsF+rHkBY+c109jNaRnFtgtRWCy6kGs2 rM70g+T9qlpkoUwdKlJFE8GXCNHSruUwj/DyZjXjF3JrAi78AsRu5LHTBONIpjRRJkIhZ U5YMY3Ye2xjQX8E8XUtCViDVbe8U1bd/iGGxHZMwp+0AlJdCT4hmmzIeQfw6ffVKPhg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=0wIsMN7T; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36F5B606A322; Fri, 4 Dec 2026 13:02:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=0wIsMN7T Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0945B1F000C2; Fri, 4 Dec 2026 13:02:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796389338; bh=qmmqD5/mzm0X5n93fVTU4e9NJ4SNR43zMU6c9BnWc10=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=0wIsMN7TIH3GASKjj+IXyyG/PYDfgaAGhM6TcI9v1l0EBt6WDi/xE3HJxMx0FW8R+ C2vVnvs6Qm9803etey2b+wp1ykP5awUoGN6aEVtx++FBRvAcAl7rWJ1tY+aBuxXIZ7 tH40HWFTsGef7qf6JjVeMiBRigSSaljVeugul/z0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Henry Martin , Ido Schimmel , Jakub Kicinski Subject: [PATCH 6.1 0955/1059] ip6mr: prevent info-leak in ip6mr_cache_report() Date: Fri, 4 Dec 2026 19:08:06 +0900 Message-ID: <20261204100708.758571444@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Henry Martin commit ea538b5790eed4f042ea787ea761cb1a695f8138 upstream. The non-WHOLEPKT branch copies the IPv6 header at offset 0 and then appends 40 bytes with skb_put(), but the mrt6msg is written at offset 0 after skb_reset_transport_header(), so the appended 40 bytes are never initialized. They hold stale heap contents. The report is queued to the mroute6 socket and copied into the IP6MRA_CREPORT_PKT netlink attribute, disclosing the stale bytes to user space. The stale bytes can contain kernel heap and image pointers, and the report is reachable from an unprivileged user namespace (MRT6_INIT in a new netns, plus the non-root RTNLGRP_IPV6_MROUTE_R group). Use skb_put_zero() instead, as the IPv4 code does since commit 4f34002e2e376 ("ipmr: prevent info-leak in pmr_cache_report()"). This issue was discovered by Tencent CodeBuddy Security. Fixes: 7bc570c8b4f75 ("[IPV6] MROUTE: Support multicast forwarding.") Cc: stable@vger.kernel.org Signed-off-by: Henry Martin Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20261112042415.617221-1-bsdhenrymartin@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ipv6/ip6mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -1124,7 +1124,7 @@ static int ip6mr_cache_report(const stru /* * Add our header */ - skb_put(skb, sizeof(*msg)); + skb_put_zero(skb, sizeof(*msg)); skb_reset_transport_header(skb); msg = (struct mrt6msg *)skb_transport_header(skb);