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: <20241113185619.54064-1-kuniyu@amazon.com>
Date: Wed, 13 Nov 2024 10:56:19 -0800
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <mengkanglai2@...wei.com>
CC: <davem@...emloft.net>, <dsahern@...nel.org>, <edumazet@...gle.com>,
	<fengtao40@...wei.com>, <kuba@...nel.org>, <linux-kernel@...r.kernel.org>,
	<netdev@...r.kernel.org>, <pabeni@...hat.com>, <yanan@...wei.com>,
	<kuniyu@...zon.com>
Subject: Re: kernel tcp sockets stuck in FIN_WAIT1 after call tcp_close

From: mengkanglai <mengkanglai2@...wei.com>
Date: Wed, 13 Nov 2024 12:40:34 +0000
> Hello, Eric:
> Commit 151c9c724d05 (tcp: properly terminate timers for kernel sockets)
> introduce inet_csk_clear_xmit_timers_sync in tcp_close.
> For kernel sockets it does not hold sk->sk_net_refcnt, if this is kernel
> tcp socket it will call tcp_send_fin in __tcp_close to send FIN packet
> to remotes server,

Just curious which subsystem the kernel socket is created by.

Recently, CIFS and sunrpc are (being) converted to hold net refcnt.

CIFS: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ef7134c7fc48e1441b398e55a862232868a6f0a7
sunrpc: https://lore.kernel.org/netdev/20241112135434.803890-1-liujian56@huawei.com/

I remember RDS's listener does not hold refcnt but other client sockets
(SMC, RDS, MPTCP, CIFS, sunrpc) do.

I think all TCP kernel sockets should hold netns refcnt except for one
created at pernet_operations.init() hook like RDS.


> if this fin packet lost due to network faults, tcp should retransmit this
> fin packet, but tcp_timer stopped by inet_csk_clear_xmit_timers_sync.
> tcp sockets state will stuck in FIN_WAIT1 and never go away. I think
> it's not right.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ