Re: [PATCH net v2] rtnetlink: Disallow FDB configuration for non-Ethernet device
From: David Ahern <hidden>
Date: 2018-10-30 05:29:46
From: David Ahern <hidden>
Date: 2018-10-30 05:29:46
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 <redacted>
Reported-and-tested-by: syzbot+3a288d5f5530b901310e@syzkaller.appspotmail.com
Reported-and-tested-by: syzbot+d53ab4e92a1db04110ff@syzkaller.appspotmail.com
Cc: Vlad Yasevich <redacted>
Cc: David Ahern <redacted>
---
net/core/rtnetlink.c | 10 ++++++++++
1 file changed, 10 insertions(+)Reviewed-by: David Ahern <redacted>