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]
Date:   Sat, 18 Mar 2017 21:03:54 -0700
From:   Kaiwen Xu <kaiwen.xu@...u.com>
To:     Cong Wang <xiyou.wangcong@...il.com>
CC:     David Miller <davem@...emloft.net>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH net v2] net: Do not hold the reference for the same
 sk_rx_dst

On Sat, Mar 18, 2017 at 08:49:43PM -0700, Cong Wang wrote:
> On Sat, Mar 18, 2017 at 6:48 PM, Kevin Xu <kaiwen.xu@...u.com> wrote:
> > In some rare cases, inet_sk_rx_dst_set() may be called multiple times
> > on the same dst, causing double refcounting. Eventually, it
> > prevents net_device to be destroyed. The bug manifested as
> >
> > unregister_netdevice: waiting for lo to become free. Usage count = 1
> >
> > in the kernel log, preventing new network namespace creation.
> >
> > Signed-off-by: Kevin Xu <kaiwen.xu@...u.com>
> 
> Don't know why you don't follow the discussion on your v1...
> 
> It is protected by bh_lock_sock(), so your patch is not needed
> at all.
> 
> Read net/ipv4/udp.c:
> 
> 1762 /* For TCP sockets, sk_rx_dst is protected by socket lock
> 1763  * For UDP, we use xchg() to guard against concurrent changes.
> 1764  */

I probably misunderstood. Do you mean v2 patch is actually not needed or
the whole workaround is not necessary?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ