From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE1E41D5AD4; Mon, 13 Apr 2026 16:36:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776098218; cv=none; b=q3pXsrheJhnYBla/6GJpH3jCV8uHZzTJhq3McVQsxQ1ghSMqo8gP4I6lv056AJeEAwSXY9VL53iqXhNoJtHp96F3kL7yLBwSh/KZKEEEt9WJGdpG1/AlMjjJibBjYH6dErPBQfLD9bxcxB3a8lf0JI/Vpd51gJ9fCmUYpFmLk0M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776098218; c=relaxed/simple; bh=oQBQp5p2NYAQAgQevdwKyzz7ek60NqFZeGUoCQXeYfc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mxZNE311qkTg6RQRstGAc7kosp04QorV4KMD/2AgZvvx41CVG0qHE0ksyvw5petJ42gSBrL8dHaFnq7bS37rxKCn9fkN6Mk629P6ywaA6cy94KiyZZsCgEUC1XKav1fMyPVc5X6ob78JCzo0ngPG4JbuubqaEARhCwxQaL/V/mo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=q/IMTMFZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="q/IMTMFZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 808D9C2BCAF; Mon, 13 Apr 2026 16:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776098217; bh=oQBQp5p2NYAQAgQevdwKyzz7ek60NqFZeGUoCQXeYfc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q/IMTMFZIm5ahPpUTsEDGpTKEtzPGm2GhY6zuJJySWWTa2KHplL0HS0ZaKWfGMyYz 9VNDMQmRLmLeZqTMG/sLlrWcuUZiaaNEob/HQNPa/vnfNBmrx5tYtMbnJst9D9oN+v sscwcv5tLWqcUUHglYABvCSAsnvgqMni5hy7kcvc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yochai Eisenrich , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 407/570] net: ipv6: ndisc: fix ndisc_ra_useropt to initialize nduseropt_padX fields to zero to prevent an info-leak Date: Mon, 13 Apr 2026 17:58:58 +0200 Message-ID: <20260413155845.714881413@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413155830.386096114@linuxfoundation.org> References: <20260413155830.386096114@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yochai Eisenrich [ Upstream commit ae05340ccaa9d347fe85415609e075545bec589f ] When processing Router Advertisements with user options the kernel builds an RTM_NEWNDUSEROPT netlink message. The nduseroptmsg struct has three padding fields that are never zeroed and can leak kernel data The fix is simple, just zeroes the padding fields. Fixes: 31910575a9de ("[IPv6]: Export userland ND options through netlink (RDNSS support)") Signed-off-by: Yochai Eisenrich Reviewed-by: Simon Horman Link: https://patch.msgid.link/20260324224925.2437775-1-echelonh@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/ipv6/ndisc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 1821c1aa97ad4..74e82982ecd08 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -1155,6 +1155,9 @@ static void ndisc_ra_useropt(struct sk_buff *ra, struct nd_opt_hdr *opt) ndmsg->nduseropt_icmp_type = icmp6h->icmp6_type; ndmsg->nduseropt_icmp_code = icmp6h->icmp6_code; ndmsg->nduseropt_opts_len = opt->nd_opt_len << 3; + ndmsg->nduseropt_pad1 = 0; + ndmsg->nduseropt_pad2 = 0; + ndmsg->nduseropt_pad3 = 0; memcpy(ndmsg + 1, opt, opt->nd_opt_len << 3); -- 2.53.0