From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net v2] rtnetlink: Disallow FDB configuration for non-Ethernet device Date: Mon, 29 Oct 2018 14:39:24 -0600 Message-ID: <425b5b88-c68f-b9a6-dc3e-2e7d5462b820@gmail.com> References: <20181029203622.20608-1-idosch@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "davem@davemloft.net" , Vlad Yasevich To: Ido Schimmel , "netdev@vger.kernel.org" Return-path: Received: from mail-pg1-f195.google.com ([209.85.215.195]:44594 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729535AbeJ3F3q (ORCPT ); Tue, 30 Oct 2018 01:29:46 -0400 Received: by mail-pg1-f195.google.com with SMTP id w3-v6so4460920pgs.11 for ; Mon, 29 Oct 2018 13:39:27 -0700 (PDT) In-Reply-To: <20181029203622.20608-1-idosch@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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_") > Signed-off-by: Ido Schimmel > Reported-and-tested-by: syzbot+3a288d5f5530b901310e@syzkaller.appspotmail.com > Reported-and-tested-by: syzbot+d53ab4e92a1db04110ff@syzkaller.appspotmail.com > Cc: Vlad Yasevich > Cc: David Ahern > --- > net/core/rtnetlink.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) Reviewed-by: David Ahern