netfilter: ipset: Null pointer exception in ipset list:set
authorVishwanath Pai <vpai@akamai.com>
Thu, 16 Feb 2017 19:55:45 +0000 (20:55 +0100)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sun, 19 Feb 2017 18:08:47 +0000 (19:08 +0100)
commit40b446a1d8af17274746ff7079aa0a618dffbac3
treec54107c91855cfec21bd9e7ea9af3a6730ed527e
parent50054a9223aaf79985c55ef7dd090ced15581567
netfilter: ipset: Null pointer exception in ipset list:set

If we use before/after to add an element to an empty list it will cause
a kernel panic.

$> cat crash.restore
create a hash:ip
create b hash:ip
create test list:set timeout 5 size 4
add test b before a

$> ipset -R < crash.restore

Executing the above will crash the kernel.

Signed-off-by: Vishwanath Pai <vpai@akamai.com>
Reviewed-by: Josh Hunt <johunt@akamai.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
net/netfilter/ipset/ip_set_list_set.c