ipv4: use siphash instead of Jenkins in fnhe_hashfun()
authorEric Dumazet <edumazet@google.com>
Wed, 25 Aug 2021 23:17:29 +0000 (16:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Nov 2021 17:25:11 +0000 (18:25 +0100)
commitb31aa41bf1e03e58cfcf837d896fca9cb038f1e4
tree2beb5011d2bf3265561235f74796730c3e30891d
parentfdbffd95c4ce94d2197c504008eaac46b16bc5a4
ipv4: use siphash instead of Jenkins in fnhe_hashfun()

commit 6457378fe796815c973f631a1904e147d6ee33b1 upstream.

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

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

Also remove the inline keyword, this really is distracting.

Fixes: d546c621542d ("ipv4: harden fnhe_hashfun()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Keyu Man <kman001@ucr.edu>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
[OP: adjusted context for 4.14 stable]
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/route.c