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 2A635318ED2; Mon, 13 Apr 2026 16:56:36 +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=1776099396; cv=none; b=THmR9mjXKHQximTGC3OqebWAiJ+IrxOb40vA2iq7Qu5I1BsrUQEoXOBcNJ9L0mHNqb5P0A0B1V1A8myB6aj0asPPdzjl+FQLZ4SsTer8MWOpVSvUplzryz8WpeyZwtqDl2E/gVj5FB+CRarE2gqppPZtC+O+C+nR9IVYbGvMtvU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776099396; c=relaxed/simple; bh=ZqSdEGA86fjv0cP2xbUx13qJGlyKQpkSo+CyTaBYnkA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ephEneHQ2SMvWmbNyqwysayHm8uz+OipgKDrZjxLG85vHQer7xeId73j6NnU6d3NifLvYARWOhpuRe0nbu/BNVOaC7siTQuAys46L/gHv4B3Z7eSfrhbr/UNCENSbP71IGJz5png8VTnxlfdOydyjWwTbDspWgci7Wbr4oV0kk4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=I/tS8isT; 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="I/tS8isT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4CEBC2BCAF; Mon, 13 Apr 2026 16:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776099396; bh=ZqSdEGA86fjv0cP2xbUx13qJGlyKQpkSo+CyTaBYnkA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I/tS8isT/cxDbLfbFiBIx5SevmKFpWDBwLktsKv5Fio2tnss/39p19h4pbe3HgelL Hhiz6+WkwzMR/RgWaMSD9tcaY2SDYACNwVNkiQ24fQBiNVmrs/6hfCuHUVwbvTpo1F N4AGYiLBKmAwU6V/LlCjjUkHeG2NAQ9Y3CITzrWw= 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.10 325/491] 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:59:30 +0200 Message-ID: <20260413155831.210830002@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413155819.042779211@linuxfoundation.org> References: <20260413155819.042779211@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-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 43ad4e5db5941..de389b519700d 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