From patchwork Tue Jun 6 10:23:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13268907 X-Patchwork-Delegate: kuba@kernel.org 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 93E6028C3A for ; Tue, 6 Jun 2023 10:23:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D992C433D2; Tue, 6 Jun 2023 10:23:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686046992; bh=Mg9pfXFs+qeGayovgVVIZFj6K9PpbuYs6ytivVToYKY=; h=From:To:Cc:Subject:Date:From; b=HFhZ4t9GkyBuZWvD96AK1yzcI6UVWAfmhXbAXwZsDVNoreQ6Ts7fC4d4o/8MyRMIc 1np4KOXcY8WDCAfHh0fyE6wkLIBCqfLp7qzp8ryKD0oFOLWc5FgegvzUK+//ZDKTcp 5e96pf+TdY3QLbO9e0XGgQqjU2Rqynp8yiNsLyX4Blg6meSkGW9bnf4Hf2hFSWtagC U7rbOxNRZVEF6pdmxtIJH5LP8/YEU03xuVLmJY33SUHG5WoJSo8NljryehhIb6o7Mn wsZQgzp5IGzG/QlXp4FjpNcLoN2ieTYXjboy6U3HVziWw33LXHAQPJ0AazLUZmm7WS E6owUpPselaTQ== From: Leon Romanovsky To: Steffen Klassert Cc: Leon Romanovsky , "David S. Miller" , Eric Dumazet , Herbert Xu , Jakub Kicinski , netdev@vger.kernel.org, Paolo Abeni Subject: [PATCH ipsec-next v1] xfrm: delete not-needed clear to zero of encap_oa Date: Tue, 6 Jun 2023 13:23:06 +0300 Message-Id: <1cd4aeb4a84ecb26171dbb90dc8300a0d71e0921.1686046811.git.leon@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Leon Romanovsky After commit 2f4796518315 ("af_key: Fix heap information leak"), there is no need to clear encap_oa again as it is already initialized to zero. Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman --- Changelog: v1: * Restored "uep->encap_oa = ep->encap_oa;" hunk in copy_to_user_encap() v0: https://lore.kernel.org/all/1ed3e00428a0036bdea14eb4f5a45706a89f11eb.1685952635.git.leon@kernel.org --- net/key/af_key.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/key/af_key.c b/net/key/af_key.c index 31ab12fd720a..14e891ebde61 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -1281,7 +1281,6 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net, ext_hdrs[SADB_X_EXT_NAT_T_DPORT-1]; natt->encap_dport = n_port->sadb_x_nat_t_port_port; } - memset(&natt->encap_oa, 0, sizeof(natt->encap_oa)); } err = xfrm_init_state(x);