]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv4: use siphash instead of Jenkins in fnhe_hashfun()
authorEric Dumazet <edumazet@google.com>
Fri, 29 Oct 2021 07:50:25 +0000 (10:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Nov 2021 17:26:44 +0000 (18:26 +0100)
commit6e2856767eb1a9cfcfcd82136928037f04920e97
tree5a942a20d3a67d34747ae01f8c1f11e10026e4ca
parent8121d0d4fd108280f5cd7b7fe8c6592adaa37be9
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.19 stable]
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/route.c