netfilter: xt_connmark: fix list corruption on rmmod
authorFlorian Westphal <fw@strlen.de>
Tue, 12 Jun 2018 16:36:19 +0000 (18:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Jul 2018 13:32:21 +0000 (15:32 +0200)
commit735c001bfb3bcf07eb2ea006a99ddcd90d864fad
tree584a947a286c857a85e13ba4157d3e1ae14f03ff
parent33e021ba64e9d9c7e8b6c5faa328996c83531261
netfilter: xt_connmark: fix list corruption on rmmod

commit fc6ddbecce440df74fb4491c17c372b52cf5be83 upstream.

This needs to use xt_unregister_targets, else new revision is left
on the list which then causes list to point to a target struct that has been free'd.

Fixes: 472a73e00757 ("netfilter: xt_conntrack: Support bit-shifting for CONNMARK & MARK targets.")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/xt_connmark.c