]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: use siphash in rt6_exception_hash()
authorEric Dumazet <edumazet@google.com>
Thu, 28 Oct 2021 17:56:30 +0000 (20:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Nov 2021 18:46:11 +0000 (19:46 +0100)
commit7857ffe278a63b833da2ec696f2388347ec690e8
tree32f604a2d5b095a193e8c13b01173152e3885d95
parent510fec4c9dc536638796df8479e7883f996dbb6d
ipv6: use siphash in rt6_exception_hash()

commit 4785305c05b25a242e5314cc821f54ade4c18810 upstream.

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: 198b618bc393 ("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>
[OP: adjusted context for 5.4 stable]
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/route.c