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=1796380999; b=czO6Q+QTFpKi4mi+Vjdk2MF+uAZsJWtDgghUZtSEMK6ZbSnjbWVdtI04ps1b77oOCi0R PNpva2j4eCI8wFC2bxzBHcSKsodTLD0Z0hfwi8Bz17WrvCDeaN48Zu+VKVL5FdUbQODn6 15JvH78mH6B+yCHhGD9GsNW54OzbLXInpaj8gfIswBJqyEnA78P8hpKuodQr0y7JJ9lF3 Cqe48ShWJTDyjZcm8ETUGyXR9gGuXS9mqXNzb48OHibP18twLmaSdLkbvxUpLNEVGNzv0 unnpPKVKMFN9gP8TuLeanmf01KKCWm8H4auHOIPYSRF7ULw1wE0GUgjd2oR73Rc0GUw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380999; 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=Em+8ALBdZWDi999UcQC18+iV+mQH0qkJbjYFAXlwVuk=; b=HMI28L7rBOrNwCft3+Gpk7vtdqOtSpkZwW9kst9+jR07fZkSKYO+1cBg8+3mLmEQ819e xc+PehsShORzL7EC73bGNMgitYKC5taXtjxVgvM+WpU6GgjpWMhB0pEjXrDG7v3CVwaqj bSMBXwcVJSGGWDWM3v112xT/bWq1QMZZmwW563eXl23ClxUCuir8X5sESX5inYN+8SKHf rhySJGhfHjphAHbCtMF7oIPhvisrwAFHrhZdYloDGKJzORlh4YL+5mPY7wzIrd1PZNeM7 BiHhaUxSjeXqLwxijHLophJa40BByODWbEP86IFVExNS1wH+gRlig+p3F0V2TJjtfrw== 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=KnlEPFIR; 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 8C67F606A322; Fri, 4 Dec 2026 10:43: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=KnlEPFIR Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0722B1F000C2; Fri, 4 Dec 2026 10:43:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380999; bh=Em+8ALBdZWDi999UcQC18+iV+mQH0qkJbjYFAXlwVuk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KnlEPFIRgQ9cOJSM5f27aNsjjmfGjOaupUsO2x2CKx+nlW3wtdj4cxQGY/cdRj3E+ WIeJoC6eRqeGj0eqZkZPr1E/eissWHKm6Rxx4SDWm5IKyK/HZaoB8qgyXk54OAUpY2 0a1aXPMKXlrn7CKmnvK5Oyw4DHW8/M7uvi47eO2A= 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 7.3 513/742] ip6mr: prevent info-leak in ip6mr_cache_report() Date: Fri, 4 Dec 2026 19:06:17 +0900 Message-ID: <20261204100648.778028850@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@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 7.3-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 @@ -1153,7 +1153,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);