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: <20150521203736.GI2379@x240.home>
Date:	Thu, 21 May 2015 17:37:36 -0300
From:	Flavio Leitner <fbl@...hat.com>
To:	Eric Dumazet <edumazet@...gle.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	Eric Dumazet <eric.dumazet@...il.com>,
	Marcelo Ricardo Leitner <mleitner@...hat.com>
Subject: Re: [PATCH net-next 2/2] tcp: improve REUSEADDR/NOREUSEADDR
 cohabitation

On Wed, May 20, 2015 at 10:59:02AM -0700, Eric Dumazet wrote:
> inet_csk_get_port() randomization effort tends to spread
> sockets on all the available range (ip_local_port_range)
> 
> This is unfortunate because SO_REUSEADDR sockets have
> less requirements than non SO_REUSEADDR ones.
> 
> If an application uses SO_REUSEADDR hint, it is to try to
> allow source ports being shared.
> 
> So instead of picking a random port number in ip_local_port_range,
> lets try first in first half of the range.
> 
> This gives more chances to use upper half of the range for the
> sockets with strong requirements (not using SO_REUSEADDR)
> 
> Note this patch does not add a new sysctl, and only changes
> the way we try to pick port number.
> 
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Marcelo Ricardo Leitner <mleitner@...hat.com>
> Cc: Flavio Leitner <fbl@...hat.com>
> ---

The only downside I can see is that after the patch the applications
using the SO_REUSEADDR will reuse ports more often and that could
potentially trigger some bug.

Looks like a good change to me.

Acked-by: Flavio Leitner <fbl@...hat.com>

--
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