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: <CANn89i+AW24XxLYMzA4Jb=QXCRb_RnWc_dTfFG19j3EP_mw9xQ@mail.gmail.com>
Date:   Wed, 31 Mar 2021 08:01:00 +0200
From:   Eric Dumazet <edumazet@...gle.com>
To:     Eric Dumazet <eric.dumazet@...il.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        netdev <netdev@...r.kernel.org>,
        syzbot <syzkaller@...glegroups.com>
Subject: Re: [PATCH net-next] ip6_tunnel: sit: proper dev_{hold|put} in
 ndo_[un]init methods

On Wed, Mar 31, 2021 at 8:00 AM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Tue, Mar 30, 2021 at 8:45 AM Eric Dumazet <eric.dumazet@...il.com> wrote:
> >
> > From: Eric Dumazet <edumazet@...gle.com>
> >
> > Same reasons than for the previous commits :
> > 6289a98f0817 ("sit: proper dev_{hold|put} in ndo_[un]init methods")
> > 40cb881b5aaa ("ip6_vti: proper dev_{hold|put} in ndo_[un]init methods")
> > 7f700334be9a ("ip6_gre: proper dev_{hold|put} in ndo_[un]init methods")
> >
> > After adopting CONFIG_PCPU_DEV_REFCNT=n option, syzbot was able to trigger
> > a warning [1]
> >
> > Issue here is that:
> >
> > - all dev_put() should be paired with a corresponding prior dev_hold().
> >
> > - A driver doing a dev_put() in its ndo_uninit() MUST also
> >   do a dev_hold() in its ndo_init(), only when ndo_init()
> >   is returning 0.
> >
> > Otherwise, register_netdevice() would call ndo_uninit()
> > in its error path and release a refcount too soon.
> >
> >
>
> Note to David & Jakub
>
> Can you merge this patch so that I can send my global fix for fallback
> tunnels, with a correct Fixes: tag for this patch ?
>
> Thanks !

Forgot to attach what the global fix would look like :

View attachment "0001-ipv6-remove-extra-dev_hold-for-fallback-tunnels.patch" of type "text/x-patch" (3126 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ