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]
Date:   Tue, 9 Nov 2021 00:13:41 +0000
From:   Eiichi Tsukata <eiichi.tsukata@...anix.com>
To:     Stefano Garzarella <sgarzare@...hat.com>
CC:     "David S. Miller" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "virtualization@...ts.linux-foundation.org" 
        <virtualization@...ts.linux-foundation.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] vsock: prevent unnecessary refcnt inc for nonblocking
 connect



> On Nov 8, 2021, at 17:30, Stefano Garzarella <sgarzare@...hat.com> wrote:
> 
> On Sun, Nov 07, 2021 at 12:03:04PM +0000, Eiichi Tsukata wrote:
>> Currently vosck_connect() increments sock refcount for nonblocking
>> socket each time it's called, which can lead to memory leak if
>> it's called multiple times because connect timeout function decrements
>> sock refcount only once.
>> 
>> Fixes it by making vsock_connect() return -EALREADY immediately when
>> sock state is already SS_CONNECTING.
>> 
>> Signed-off-by: Eiichi Tsukata <eiichi.tsukata@...anix.com>
>> ---
>> net/vmw_vsock/af_vsock.c | 2 ++
>> 1 file changed, 2 insertions(+)
> 
> Make sense to me, thanks for fixing this issue!
> I think would be better to add the Fixes ref in the commit message:
> 
> Fixes: d021c344051a ("VSOCK: Introduce VM Sockets")
> 
> With that:
> Reviewed-by: Stefano Garzarella <sgarzare@...hat.com>
> 
> Thanks,
> Stefano
> 

Thanks for comments! I’ll add Fixes and Reviewed-by tag then send v2.

Eiichi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ