]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: use siphash instead of Jenkins in fnhe_hashfun()
authorEric Dumazet <edumazet@google.com>
Thu, 28 Oct 2021 17:56:31 +0000 (20:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Nov 2021 18:46:11 +0000 (19:46 +0100)
commit711848a28b1226a7833261395d32d581ec685bea
treec30173c75fdb228b92715f073d480ff78e0f715d
parent7857ffe278a63b833da2ec696f2388347ec690e8
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: 389806896e25 ("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 5.4 stable]
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/route.c