Files
linux/include/net
Eric Dumazet adbb8bdd39 netns: provide pure entropy for net_hash_mix()
[ Upstream commit 355b985537 ]

net_hash_mix() currently uses kernel address of a struct net,
and is used in many places that could be used to reveal this
address to a patient attacker, thus defeating KASLR, for
the typical case (initial net namespace, &init_net is
not dynamically allocated)

I believe the original implementation tried to avoid spending
too many cycles in this function, but security comes first.

Also provide entropy regardless of CONFIG_NET_NS.

Fixes: 0b4419162a ("netns: introduce the net_hash_mix "salt" for hashes")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Amit Klein <aksecurity@gmail.com>
Reported-by: Benny Pinkas <benny@pinkas.net>
Cc: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-17 08:37:50 +02:00
..
2017-07-11 06:08:58 -04:00
2018-09-29 03:06:01 -07:00
2019-03-23 14:35:16 +01:00
2019-02-23 09:06:44 +01:00
2018-10-18 09:16:17 +02:00
2016-07-08 12:20:57 +02:00
2016-04-25 16:44:27 -04:00
2016-04-25 16:44:27 -04:00
2017-08-31 14:42:19 -07:00
2019-03-13 14:03:09 -07:00
2017-06-15 12:12:40 -04:00
2018-09-19 22:43:46 +02:00
2016-08-17 19:36:23 -04:00
2016-10-03 02:00:22 -04:00
2018-05-16 10:10:23 +02:00
2016-07-08 12:20:57 +02:00
2016-03-23 22:09:58 -04:00
2018-02-25 11:07:59 +01:00