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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250103145210.84506-1-kuniyu@amazon.com>
Date: Fri, 3 Jan 2025 23:52:10 +0900
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <dzq.aishenghu0@...il.com>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <kerneljasonxing@...il.com>,
	<kuba@...nel.org>, <kuniyu@...zon.com>, <netdev@...r.kernel.org>,
	<pabeni@...hat.com>
Subject: Re: [PATCH] tcp/dccp: allow a connection when sk_max_ack_backlog is zero

From: Zhongqiu Duan <dzq.aishenghu0@...il.com>
Date: Thu,  2 Jan 2025 17:14:26 +0000
> If the backlog of listen() is set to zero, sk_acceptq_is_full() allows
> one connection to be made, but inet_csk_reqsk_queue_is_full() does not.
> When the net.ipv4.tcp_syncookies is zero, inet_csk_reqsk_queue_is_full()
> will cause an immediate drop before the sk_acceptq_is_full() check in
> tcp_conn_request(), resulting in no connection can be made.
> 
> This patch tries to keep consistent with 64a146513f8f ("[NET]: Revert
> incorrect accept queue backlog changes.").
> 
> Link: https://lore.kernel.org/netdev/20250102080258.53858-1-kuniyu@amazon.com/
> Fixes: ef547f2ac16b ("tcp: remove max_qlen_log")
> Signed-off-by: Zhongqiu Duan <dzq.aishenghu0@...il.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@...zon.com>


> ---
>  include/net/inet_connection_sock.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
> index 3c82fad904d4..c7f42844c79a 100644
> --- a/include/net/inet_connection_sock.h
> +++ b/include/net/inet_connection_sock.h
> @@ -282,7 +282,7 @@ static inline int inet_csk_reqsk_queue_len(const struct sock *sk)
>  
>  static inline int inet_csk_reqsk_queue_is_full(const struct sock *sk)
>  {
> -	return inet_csk_reqsk_queue_len(sk) >= READ_ONCE(sk->sk_max_ack_backlog);
> +	return inet_csk_reqsk_queue_len(sk) > READ_ONCE(sk->sk_max_ack_backlog);
>  }
>  
>  bool inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req);
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ