lkml.org 
[lkml]   [2014]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.10 084/104] fib_frontend: fix possible NULL pointer dereference
    Date
    3.10-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Oliver Hartkopp <socketcan@hartkopp.net>

    [ Upstream commit a0065f266a9b5d51575535a25c15ccbeed9a9966 ]

    The two commits 0115e8e30d (net: remove delay at device dismantle) and
    748e2d9396a (net: reinstate rtnl in call_netdevice_notifiers()) silently
    removed a NULL pointer check for in_dev since Linux 3.7.

    This patch re-introduces this check as it causes crashing the kernel when
    setting small mtu values on non-ip capable netdevices.

    Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
    Acked-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    net/ipv4/fib_frontend.c | 2 ++
    1 file changed, 2 insertions(+)

    --- a/net/ipv4/fib_frontend.c
    +++ b/net/ipv4/fib_frontend.c
    @@ -1049,6 +1049,8 @@ static int fib_netdev_event(struct notif
    }

    in_dev = __in_dev_get_rtnl(dev);
    + if (!in_dev)
    + return NOTIFY_DONE;

    switch (event) {
    case NETDEV_UP:



    \
     
     \ /
      Last update: 2014-02-05 00:21    [W:4.083 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site