Eric Dumazet aa6dd211e4 inet: use bigger hash table for IP ID generation
In commit 73f156a6e8c1 ("inetpeer: get rid of ip_id_count")
I used a very small hash table that could be abused
by patient attackers to reveal sensitive information.

Switch to a dynamic sizing, depending on RAM size.

Typical big hosts will now use 128x more storage (2 MB)
to get a similar increase in security and reduction
of hash collisions.

As a bonus, use of alloc_large_system_hash() spreads
allocated memory among all NUMA nodes.

Fixes: 73f156a6e8c1 ("inetpeer: get rid of ip_id_count")
Reported-by: Amit Klein <aksecurity@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-24 16:45:11 -07:00
..
2021-03-03 16:57:59 -08:00
2021-02-06 11:15:28 -08:00
2021-03-22 13:17:49 -07:00
2021-03-22 12:59:46 -07:00
2021-03-24 15:09:11 -07:00
2021-02-26 09:17:24 -08:00
2021-01-24 14:27:18 +01:00
2021-03-19 13:38:46 -07:00
2021-02-27 08:29:02 -08:00