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 56F1A2E093A; Mon, 20 Apr 2026 15:52:41 +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=1776700361; cv=none; b=ZDQLhuChzOAgik8QwnITdUL7GOkOU7tl/IU/ifPJcXYpz4eBXyqIjwksralsVU6Cus4plaoZAg7DDrfo43hunjSgupcTFu0MiBOWmqwJqT+MTow7Hg5OSp+byGLx3z+hopklv3Oku+eu2onp9QDaG2qenzn8x3vu4OgvsBPwl2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776700361; c=relaxed/simple; bh=6O705tRrsG6whIrh7YkDwmq9rYdxpYHQ5s6Mgjdze+Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JCiafXgBKS1SG2o7qm4uVXz7XQkRi1uacDQLTdkKoEWUxpT99vCJYZ9M9dpJA2UwrmQQPHBWCQ2mCWDqfSsFnHdCQ6CVQBRmIuS0y2TBEiEiOa6Rwav1q+sR4sU/POU6ixpj0Of0eGlAu75dwMB2pvyMoOOJxyS4OagNMNjsbjo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IjuTChUv; 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="IjuTChUv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E14BCC19425; Mon, 20 Apr 2026 15:52:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776700361; bh=6O705tRrsG6whIrh7YkDwmq9rYdxpYHQ5s6Mgjdze+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IjuTChUv8ce3ihwUloTe5mCSXIRjF/EGVkLqjUsj0A3tuoOqyxEi1n6/4PBXo8Dii 8Q+wT3YEG289jfPme8nYkcjGeZ7jl9SC+cAFIG58fuqn/Up/eBs0AFc6u25eW32iQv FWJ8uPJmrwrObIorlq2IGea7IzF1CeNPe8y9FZRU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Steffen Klassert , Herbert Xu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Sasha Levin Subject: [PATCH 6.19 109/220] xfrm_user: fix info leak in build_mapping() Date: Mon, 20 Apr 2026 17:40:50 +0200 Message-ID: <20260420153937.957880643@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260420153934.013228280@linuxfoundation.org> References: <20260420153934.013228280@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 6.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Greg Kroah-Hartman [ Upstream commit 1beb76b2053b68c491b78370794b8ff63c8f8c02 ] struct xfrm_usersa_id has a one-byte padding hole after the proto field, which ends up never getting set to zero before copying out to userspace. Fix that up by zeroing out the whole structure before setting individual variables. Fixes: 3a2dfbe8acb1 ("xfrm: Notify changes in UDP encapsulation via netlink") Cc: Steffen Klassert Cc: Herbert Xu Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Simon Horman Assisted-by: gregkh_clanker_t1000 Signed-off-by: Greg Kroah-Hartman Signed-off-by: Steffen Klassert Signed-off-by: Sasha Levin --- net/xfrm/xfrm_user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 1ddcf2a1eff7a..b3f69c0760d4c 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -4164,6 +4164,7 @@ static int build_mapping(struct sk_buff *skb, struct xfrm_state *x, um = nlmsg_data(nlh); + memset(&um->id, 0, sizeof(um->id)); memcpy(&um->id.daddr, &x->id.daddr, sizeof(um->id.daddr)); um->id.spi = x->id.spi; um->id.family = x->props.family; -- 2.53.0