[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130221224316.GA9671@order.stressinduktion.org>
Date: Thu, 21 Feb 2013 23:43:16 +0100
From: Hannes Frederic Sowa <hannes@...essinduktion.org>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Neal Cardwell <ncardwell@...gle.com>,
Yuchung Cheng <ycheng@...gle.com>
Subject: Re: [PATCH] ipv6: use a stronger hash for tcp
On Thu, Feb 21, 2013 at 02:18:52PM -0800, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> It looks like its possible to open thousands of TCP IPv6
> sessions on a server, all landing in a single slot of TCP hash
> table. Incoming packets have to lookup sockets in a very
> long list.
>
> We should hash all bits from foreign IPv6 addresses, using
> a salt and hash mix, not a simple XOR.
>
> inet6_ehashfn() can also separately use the ports, instead
> of xoring them.
I like this change. Some weeks ago I have looked at the tcp-metrics
cache if the weak ipv6 xor hashes could be used to have negative impact
on servers. Luckily the maximum length of the lists is checked to not
grow beyond 5 entries (after that reclamation kicks in).
With IPv6 this seems to be a new attack scenario with each user having
a /64 they could generate about 2^32 hash colliding ipv6 addresses
(in case of xor hashing) where a full tcp 3whs and shutdown could be made.
Perhaps we should use ipv6_addr_jhash in the destination cache, too, and look
at other uses of ipv6_addr_hash?
--
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