diff options
author | Eric Dumazet <[email protected]> | 2021-08-29 15:16:14 -0700 |
---|---|---|
committer | David S. Miller <[email protected]> | 2021-08-30 12:21:38 +0100 |
commit | a00df2caffed3883c341d5685f830434312e4a43 (patch) | |
tree | 0bf30781380505edb5bb38f83d5b1c84dd83bed1 /net/lapb/lapb_timer.c | |
parent | 9dfa859da0f5fe9dae4d2fca76c5c0272e43c702 (diff) |
ipv6: make exception cache less predictible
Even after commit 4785305c05b2 ("ipv6: use siphash in rt6_exception_hash()"),
an attacker can still use brute force to learn some secrets from a victim
linux host.
One way to defeat these attacks is to make the max depth of the hash
table bucket a random value.
Before this patch, each bucket of the hash table used to store exceptions
could contain 6 items under attack.
After the patch, each bucket would contains a random number of items,
between 6 and 10. The attacker can no longer infer secrets.
This is slightly increasing memory size used by the hash table,
we do not expect this to be a problem.
Following patch is dealing with the same issue in IPv4.
Fixes: 35732d01fe31 ("ipv6: introduce a hash table to store dst cache")
Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: Keyu Man <[email protected]>
Cc: Wei Wang <[email protected]>
Cc: Martin KaFai Lau <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions