]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ipset: fix hash size checking in kernel
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Mon, 14 May 2012 01:47:01 +0000 (01:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 May 2012 19:38:49 +0000 (15:38 -0400)
commit25ad356deabda521c271a475b3117e92ff1d5a4c
tree046834414e20d334fc5172275a53c55d9722a714
parent049caa6840e9eafdba2cbf8c1847e34af74179ab
netfilter: ipset: fix hash size checking in kernel

The hash size must fit both into u32 (jhash) and the max value of
size_t. The missing checking could lead to kernel crash, bug reported
by Seblu.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netfilter/ipset/ip_set_ahash.h
net/netfilter/ipset/ip_set_hash_ip.c
net/netfilter/ipset/ip_set_hash_ipport.c
net/netfilter/ipset/ip_set_hash_ipportip.c
net/netfilter/ipset/ip_set_hash_ipportnet.c
net/netfilter/ipset/ip_set_hash_net.c
net/netfilter/ipset/ip_set_hash_netiface.c
net/netfilter/ipset/ip_set_hash_netport.c