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 <dan.carpen...@linaro.org> > Closes: > https://lore.kernel.org/netdev/5f63dd25-de94-4ca3-84e6-14095953db13@moroto.mountain > Signed-off-by: Alexander Lobakin <aleksander.loba...@intel.com>
Reviewed-by: Simon Horman <ho...@kernel.org>