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: <CANn89iLQ-g-y2UpSjezUSgsYRiy6Te-xOOZ6pnp8c8xecrUzSg@mail.gmail.com>
Date: Thu, 14 Mar 2024 09:27:17 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, David Ahern <dsahern@...nel.org>, 
	Joanne Koong <joannelkoong@...il.com>, Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org, 
	syzbot+12c506c1aae251e70449@...kaller.appspotmail.com
Subject: Re: [PATCH v1 net] tcp: Fix refcnt handling in __inet_hash_connect().

On Fri, Mar 8, 2024 at 9:16 PM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
>
> syzbot reported a warning in sk_nulls_del_node_init_rcu().
>
> The commit 66b60b0c8c4a ("dccp/tcp: Unhash sk from ehash for tb2 alloc
> failure after check_estalblished().") tried to fix an issue that an
> unconnected socket occupies an ehash entry when bhash2 allocation fails.
>
> In such a case, we need to revert changes done by check_established(),
> which does not hold refcnt when inserting socket into ehash.
>
> So, to revert the change, we need to __sk_nulls_add_node_rcu() instead
> of sk_nulls_add_node_rcu().
>
> Otherwise, sock_put() will cause refcnt underflow and leak the socket.
>
> [0
> Reported-by: syzbot+12c506c1aae251e70449@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=12c506c1aae251e70449
> Fixes: 66b60b0c8c4a ("dccp/tcp: Unhash sk from ehash for tb2 alloc failure after check_estalblished().")
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
> ---

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ