diff options
author | Andrea Claudi <aclaudi@redhat.com> | 2021-09-10 18:08:39 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-06 15:42:32 +0200 |
commit | 2c30592255c6b054f353c767a69c2fef7607248d (patch) | |
tree | 0f5b3cb3f46cbb7fc7e690aafc574f1608346fe9 /net/unix/af_unix.c | |
parent | 9a571d83acb564827867c54b30c3e5f05d6338ae (diff) |
ipvs: check that ip_vs_conn_tab_bits is between 8 and 20
[ Upstream commit 69e73dbfda14fbfe748d3812da1244cce2928dcb ]
ip_vs_conn_tab_bits may be provided by the user through the
conn_tab_bits module parameter. If this value is greater than 31, or
less than 0, the shift operator used to derive tab_size causes undefined
behaviour.
Fix this checking ip_vs_conn_tab_bits value to be in the range specified
in ipvs Kconfig. If not, simply use default value.
Fixes: 6f7edb4881bf ("IPVS: Allow boot time change of hash size")
Reported-by: Yi Chen <yiche@redhat.com>
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions