* [PATCH ipsec-next v1] xfrm: delete not-needed clear to zero of encap_oa
@ 2023-06-06 10:23 Leon Romanovsky
2023-06-06 14:43 ` Simon Horman
2023-06-12 11:48 ` Steffen Klassert
0 siblings, 2 replies; 3+ messages in thread
From: Leon Romanovsky @ 2023-06-06 10:23 UTC (permalink / raw)
To: Steffen Klassert
Cc: Leon Romanovsky, David S. Miller, Eric Dumazet, Herbert Xu,
Jakub Kicinski, netdev, Paolo Abeni
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>
---
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);
--
2.40.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH ipsec-next v1] xfrm: delete not-needed clear to zero of encap_oa
2023-06-06 10:23 [PATCH ipsec-next v1] xfrm: delete not-needed clear to zero of encap_oa Leon Romanovsky
@ 2023-06-06 14:43 ` Simon Horman
2023-06-12 11:48 ` Steffen Klassert
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-06-06 14:43 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Steffen Klassert, Leon Romanovsky, David S. Miller, Eric Dumazet,
Herbert Xu, Jakub Kicinski, netdev, Paolo Abeni
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH ipsec-next v1] xfrm: delete not-needed clear to zero of encap_oa
2023-06-06 10:23 [PATCH ipsec-next v1] xfrm: delete not-needed clear to zero of encap_oa Leon Romanovsky
2023-06-06 14:43 ` Simon Horman
@ 2023-06-12 11:48 ` Steffen Klassert
1 sibling, 0 replies; 3+ messages in thread
From: Steffen Klassert @ 2023-06-12 11:48 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Leon Romanovsky, David S. Miller, Eric Dumazet, Herbert Xu,
Jakub Kicinski, netdev, Paolo Abeni
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!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-12 11:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06 10:23 [PATCH ipsec-next v1] xfrm: delete not-needed clear to zero of encap_oa Leon Romanovsky
2023-06-06 14:43 ` Simon Horman
2023-06-12 11:48 ` Steffen Klassert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).