From: Richard Alpe <[email protected]>
Date: Thu, 3 Mar 2016 14:20:42 +0100

> The netlink policy for TIPC_NLA_UDP_LOCAL and TIPC_NLA_UDP_REMOTE
> is of type binary with a defined length. This causes the policy
> framework to threat the defined length as maximum length.
> 
> There is however no protection against a user sending a smaller
> amount of data. Prior to this patch this wasn't handled which could
> result in a partially incomplete sockaddr_storage struct containing
> uninitialized data.
> 
> In this patch we use nla_memcpy() when copying the user data. This
> ensures a potential gap at the end is cleared out properly.
> 
> This was found by Julia with Coccinelle tool.
> 
> Reported-by: Daniel Borkmann <[email protected]>
> Reported-by: Julia Lawall <[email protected]>
> Signed-off-by: Richard Alpe <[email protected]>
> Acked-by: Jon Maloy <[email protected]>
> Reviewed-by: Erik Hugne <[email protected]>

Applied.

Reply via email to