]> granicus.if.org Git - ipset/commitdiff
Dumping error triggered removing references twice and lead to kernel BUG
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Wed, 31 Aug 2011 10:32:55 +0000 (12:32 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Wed, 31 Aug 2011 10:32:55 +0000 (12:32 +0200)
If there was a dumping error in the middle, the set-specific variable was
not zeroed out and thus the 'done' function of the dumping wrongly tried
to release the already released reference of the set. The already released
reference was caught by __ip_set_put and triggered a kernel BUG message.
The issue was reported by Jean-Philippe Menil.

kernel/net/netfilter/ipset/ip_set_core.c

index b5d380c184fd38cd2a7dfbdbca4d72bd275d5538..c3eabfdde595ecb6576c282d5c2c0a1677909de4 100644 (file)
@@ -1148,6 +1148,7 @@ release_refcount:
        if (ret || !cb->args[2]) {
                pr_debug("release set %s\n", ip_set_list[index]->name);
                ip_set_put_byindex(index);
+               cb->args[2] = 0;
        }
 out:
        if (nlh) {