On 10/29/18 2:36 PM, Ido Schimmel wrote:
> When an FDB entry is configured, the address is validated to have the
> length of an Ethernet address, but the device for which the address is
> configured can be of any type.
>
> The above can result in the use of uninitialized memory when the address
> is later compared against existing addresses since 'dev->addr_len' is
> used and it may be greater than ETH_ALEN, as with ip6tnl devices.
>
> Fix this by making sure that FDB entries are only configured for
> Ethernet devices.
...
>
> Fixes: 090096bf3db1 ("net: generic fdb support for drivers without
> ndo_fdb_<op>")
> Signed-off-by: Ido Schimmel <[email protected]>
> Reported-and-tested-by: [email protected]
> Reported-and-tested-by: [email protected]
> Cc: Vlad Yasevich <[email protected]>
> Cc: David Ahern <[email protected]>
> ---
> net/core/rtnetlink.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
Reviewed-by: David Ahern <[email protected]>