Re: netlink: NULL timer crash

From: Eric Dumazet
Date: Thu Mar 23 2017 - 15:32:40 EST


On Thu, 2017-03-23 at 12:00 -0700, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@xxxxxxxxx>
> Date: Thu, 23 Mar 2017 09:00:58 -0700
>
> > On Thu, 2017-03-23 at 07:53 -0700, Eric Dumazet wrote:
> >
> >> Nice !
> >>
> >> Looks like neigh->ops->solicit is NULL
> >
> > Apparently we allow admins to do really stupid things with neighbours
> > on tunnels.
> >
> > Following patch should avoid the crash.
> >
> > Anyone has better ideas ?
>
> This is probably good enough for now, but you need to also handle
> dn_neigh_ops.
>
> Another way to solve this is to add a NULL method check to the
> one spot where we invoke this method. That clearly shows that
> the method is optional.

Yes, this would be a one liner. I will post this in a minute.

Thanks.