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:   Sun, 14 Nov 2021 15:54:18 -0800
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        Eric Dumazet <eric.dumazet@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] sock: fix /proc/net/sockstat underflow in sk_clone_lock()



On 11/14/21 2:43 PM, Tetsuo Handa wrote:
> On 2021/11/15 5:01, Eric Dumazet wrote:
>> On 11/13/21 10:02 PM, Tetsuo Handa wrote:
>>> sk_clone_lock() needs to call get_net() and sock_inuse_inc() together, or
> 
> s/sock_inuse_inc/sock_inuse_add/
> 
>>> socket_seq_show() will underflow when __sk_free() from sk_free() from
>>> sk_free_unlock_clone() is called.
>>>
>>
>> IMO, a "sock_inuse_get() underflow" is a very different problem,
> 
> Yes, a different problem. I found this problem while trying to examine
> https://syzkaller.appspot.com/bug?extid=694120e1002c117747ed where
> somebody might be failing to call get_net() or we might be failing to
> make sure that all timers are synchronously stopped before put_net().
> 
>> I suspect this should be fixed with the following patch.
> 
> My patch addresses a permanent underflow problem which remains as long as
> that namespace exists. Your patch addresses a temporal underflow problem
> which happens due to calculating the sum without locks. Therefore, we can
> apply both patches if we want.
> 

I think your changelog is a bit confusing.

It would really help if you add the Fixes: tag, because if you do

1) It makes the patch much easier to understand, by reading again the the old patch.

2) We can tell if we can merge both fixes in the same submission (if they share the same bug origin)

Thanks !

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ