Re: [PATCH net] net: neigh: guard against NULL solicit() method

From: David Miller
Date: Fri Mar 24 2017 - 00:29:13 EST


From: Eric Dumazet <eric.dumazet@xxxxxxxxx>
Date: Thu, 23 Mar 2017 12:39:21 -0700

> From: Eric Dumazet <edumazet@xxxxxxxxxx>
>
> Dmitry posted a nice reproducer of a bug triggering in neigh_probe()
> when dereferencing a NULL neigh->ops->solicit method.
>
> This can happen for arp_direct_ops/ndisc_direct_ops and similar,
> which can be used for NUD_NOARP neighbours (created when dev->header_ops
> is NULL). Admin can then force changing nud_state to some other state
> that would fire neigh timer.
>
> Signed-off-by: Eric Dumazet <edumazet@xxxxxxxxxx>
> Reported-by: Dmitry Vyukov <dvyukov@xxxxxxxxxx>

Applied and queued up for -stable, thanks Eric.