Message ID | 1cd4aeb4a84ecb26171dbb90dc8300a0d71e0921.1686046811.git.leon@kernel.org (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [ipsec-next,v1] xfrm: delete not-needed clear to zero of encap_oa | expand |
On Tue, Jun 06, 2023 at 01:23:06PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky <leonro@nvidia.com> > > 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 <leonro@nvidia.com> Reviewed-by: Simon Horman <simon.horman@corigine.com>
On Tue, Jun 06, 2023 at 01:23:06PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky <leonro@nvidia.com> > > 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 <leonro@nvidia.com> Applied, thanks Leon!
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);