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: <1272476697.2267.95.camel@edumazet-laptop>
Date:	Wed, 28 Apr 2010 19:44:57 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	grzegorz.chwesewicz@...is.net.pl, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, Evgeniy Polyakov <zbr@...emap.net>
Subject: Re: Problem with "tcp: bind() fix when many ports are bound" commit

Le mercredi 28 avril 2010 à 19:34 +0200, Eric Dumazet a écrit :
> L
> I am going to test following patch in a couple of hours (I have to
> run ...)
> 
> Always allowing a reuse LISTEN if no other listener is already active on
> same IP.
> 
> diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
> index 78cbc39..e2076dd 100644
> --- a/net/ipv4/inet_connection_sock.c
> +++ b/net/ipv4/inet_connection_sock.c
> @@ -78,6 +78,7 @@ int inet_csk_bind_conflict(const struct sock *sk,
>  				    sk2_rcv_saddr == sk_rcv_saddr)
>  					break;
>  			} else if (reuse && sk2->sk_reuse &&
> +				   sk->sk_state != TCP_LISTEN &&
>  				   sk2_rcv_saddr &&
>  				   sk2_rcv_saddr == sk_rcv_saddr)
>  				break;
> 
> 
> --

Hmm, this wont work because we dont know this sk socket will serve as a
listener.

bind(... port=80);

listen(...) or connect(...)

David, I think we should revert patches for linux-2.6, and work on this
problem more closely on net-next-2.6

Thanks


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ