xfrm: delete not-needed clear to zero of encap_oa
Subsystems (3)
PATCH 1/1 xfrm: delete not-needed clear to zero of encap_oa
From: Leon Romanovsky <[email protected]>
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.
---
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(-)
net/key/af_key.c +0 -1
@@ -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);
Signature · 1 line
2.40.1
Quoted 6 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
After commit
2f4796518315("af_key: Fix heap information leak"), there is no need to clearencap_oaagain as it is already initialized to zero.Signed-off-by Leon Romanovsky <[email protected]>
Quoted 6 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
After commit
2f4796518315("af_key: Fix heap information leak"), there is no need to clearencap_oaagain as it is already initialized to zero.Signed-off-by Leon Romanovsky <[email protected]>
Applied, thanks Leon!