On Thu, Apr 04, 2024 at 06:03:02PM +0200, Alexander Lobakin wrote:
> Structures which are about to be copied to userspace shouldn't have
> uninitialized fields or paddings.
> memset() the whole &ip_tunnel_parm in ip_tunnel_parm_to_user() before
> filling it with the kernel data. The compilers will hopefully combine
> writes to it.
> 
> Fixes: 117aef12a7b1 ("ip_tunnel: use a separate struct to store tunnel params 
> in the kernel")
> Reported-by: Dan Carpenter <[email protected]>
> Closes: 
> https://lore.kernel.org/netdev/[email protected]
> Signed-off-by: Alexander Lobakin <[email protected]>

Reviewed-by: Simon Horman <[email protected]>

Reply via email to