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] [day] [month] [year] [list]
Message-ID: <1477015769.7065.41.camel@edumazet-glaptop3.roam.corp.google.com>
Date:   Thu, 20 Oct 2016 19:09:29 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Cong Wang <xiyou.wangcong@...il.com>
Cc:     Baozeng Ding <sploving1@...il.com>,
        David Miller <davem@...emloft.net>,
        network dev <netdev@...r.kernel.org>
Subject: Re: [PATCH net] udp: must lock the socket in udp_disconnect()

On Thu, 2016-10-20 at 18:12 -0700, Cong Wang wrote:

> If this is the cause of the hashlist corruption (I am still unsure about this),
> then why only UDP? Don't all of those using ip4_datagram_connect()
> as ->connect() and using udp_disconnect() as ->disconnect() need this fix?
> 
> For example, after your patch,
> 
>         .connect =      ip4_datagram_connect,
> -       .disconnect =   udp_disconnect,
> +       .disconnect =   __udp_disconnect,
> 
> Ping socket still doesn't have sock lock for ->disconnect() but has it for
> ->connect()? I must miss something...

ping is less complex, it is protected by a single ping_table.lock

While UDP has to maintain two hash chains with may locks, and has to
handle rehash(), because autobind happens before full 4-tuple is setup.





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ