diff options
author | Florian Westphal <fw@strlen.de> | 2018-06-12 18:36:19 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-08 15:32:21 +0200 |
commit | 735c001bfb3bcf07eb2ea006a99ddcd90d864fad (patch) | |
tree | 584a947a286c857a85e13ba4157d3e1ae14f03ff | |
parent | 33e021ba64e9d9c7e8b6c5faa328996c83531261 (diff) |
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>
-rw-r--r-- | net/netfilter/xt_connmark.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/xt_connmark.c b/net/netfilter/xt_connmark.c index 94df000abb92..29c38aa7f726 100644 --- a/net/netfilter/xt_connmark.c +++ b/net/netfilter/xt_connmark.c @@ -211,7 +211,7 @@ static int __init connmark_mt_init(void) static void __exit connmark_mt_exit(void) { xt_unregister_match(&connmark_mt_reg); - xt_unregister_target(connmark_tg_reg); + xt_unregister_targets(connmark_tg_reg, ARRAY_SIZE(connmark_tg_reg)); } module_init(connmark_mt_init); |