]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv6: use siphash in rt6_exception_hash()
authorEric Dumazet <edumazet@google.com>
Wed, 25 Aug 2021 23:17:28 +0000 (16:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Sep 2021 08:22:55 +0000 (10:22 +0200)
commitb3f99fcc204b8f05a924922fdeb17f9be968137f
tree080b46141f5b742a6262dd2dc1d5d8eb7caf5ccc
parent1a72ef276754bda2f894988a988d376d38dd5a2c
ipv6: use siphash in rt6_exception_hash()

[ Upstream commit 4785305c05b25a242e5314cc821f54ade4c18810 ]

A group of security researchers brought to our attention
the weakness of hash function used in rt6_exception_hash()

Lets use siphash instead of Jenkins Hash, to considerably
reduce security risks.

Following patch deals with IPv4.

Fixes: 35732d01fe31 ("ipv6: introduce a hash table to store dst cache")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Keyu Man <kman001@ucr.edu>
Cc: Wei Wang <weiwan@google.com>
Cc: Martin KaFai Lau <kafai@fb.com>
Acked-by: Wei Wang <weiwan@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/route.c