lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABWKuGW5bvPDvNv5=Fj_=f9=gk--=_w28jsCJ8MK5t7ysK+s8g@mail.gmail.com>
Date:   Sun, 21 Feb 2021 10:20:44 +0800
From:   Yejune Deng <yejune.deng@...il.com>
To:     David Ahern <dsahern@...il.com>
Cc:     David Miller <davem@...emloft.net>, yoshfuji@...ux-ipv6.org,
        dsahern@...nel.org, Jakub Kicinski <kuba@...nel.org>,
        netdev <netdev@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arp: Remove the arp_hh_ops structure

Sorry,it was my fault, I will resubmit.

On Sun, Feb 21, 2021 at 9:54 AM David Ahern <dsahern@...il.com> wrote:
>
> On 2/19/21 9:32 PM, Yejune Deng wrote:
> >  static const struct neigh_ops arp_direct_ops = {
> >       .family =               AF_INET,
> >       .output =               neigh_direct_output,
> > @@ -277,15 +269,10 @@ static int arp_constructor(struct neighbour *neigh)
> >                       memcpy(neigh->ha, dev->broadcast, dev->addr_len);
> >               }
> >
> > -             if (dev->header_ops->cache)
> > -                     neigh->ops = &arp_hh_ops;
> > -             else
> > -                     neigh->ops = &arp_generic_ops;
>
> How did you test this?
>
> you took out the neigh->ops assignment, so all of the neigh->ops in
> net/core/neighbour.c are going to cause a NULL dereference.
>
>
> > -
> > -             if (neigh->nud_state & NUD_VALID)
> > -                     neigh->output = neigh->ops->connected_output;
> > +             if (!dev->header_ops->cache && (neigh->nud_state & NUD_VALID))
> > +                     neigh->output = arp_generic_ops.connected_output;
> >               else
> > -                     neigh->output = neigh->ops->output;
> > +                     neigh->output = arp_generic_ops.output;
> >       }
> >       return 0;
> >  }
> >
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ