[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160306.225808.1376970866333167103.davem@davemloft.net>
Date: Sun, 06 Mar 2016 22:58:08 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: richard.alpe@...csson.com
Cc: netdev@...r.kernel.org, tipc-discussion@...ts.sourceforge.net
Subject: Re: [PATCH net-next v1 3/4] tipc: safely copy UDP netlink data
from user
From: Richard Alpe <richard.alpe@...csson.com>
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 <daniel@...earbox.net>
> Reported-by: Julia Lawall <julia.lawall@...6.fr>
> Signed-off-by: Richard Alpe <richard.alpe@...csson.com>
> Acked-by: Jon Maloy <jon.maloy@...csson.com>
> Reviewed-by: Erik Hugne <erik.hugne@...il.com>
Applied.
Powered by blists - more mailing lists