diff options
author | Ido Schimmel <idosch@mellanox.com> | 2017-07-28 22:27:44 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-01 02:51:11 +0200 |
commit | 71ed7ee35ad2c5300f4b51634185a0193b4fb0fa (patch) | |
tree | 2d4154df8757c876a60c261357cf8ba1a85a9aa6 /MAINTAINERS | |
parent | net: phy: Correctly process PHY_HALTED in phy_stop_machine() (diff) | |
download | linux-71ed7ee35ad2c5300f4b51634185a0193b4fb0fa.tar.xz linux-71ed7ee35ad2c5300f4b51634185a0193b4fb0fa.zip |
ipv4: fib: Fix NULL pointer deref during fib_sync_down_dev()
Michał reported a NULL pointer deref during fib_sync_down_dev() when
unregistering a netdevice. The problem is that we don't check for
'in_dev' being NULL, which can happen in very specific cases.
Usually routes are flushed upon NETDEV_DOWN sent in either the netdev or
the inetaddr notification chains. However, if an interface isn't
configured with any IP address, then it's possible for host routes to be
flushed following NETDEV_UNREGISTER, after NULLing dev->ip_ptr in
inetdev_destroy().
To reproduce:
$ ip link add type dummy
$ ip route add local 1.1.1.0/24 dev dummy0
$ ip link del dev dummy0
Fix this by checking for the presence of 'in_dev' before referencing it.
Fixes: 982acb97560c ("ipv4: fib: Notify about nexthop status changes")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions