Commit ca794f01 authored by Florian Westphal's avatar Florian Westphal Committed by Kleber Sacilotto de Souza

netfilter: x_tables: set module owner for icmp(6) matches

BugLink: https://bugs.launchpad.net/bugs/1792377

[ Upstream commit d376bef9 ]

nft_compat relies on xt_request_find_match to increment
refcount of the module that provides the match/target.

The (builtin) icmp matches did't set the module owner so it
was possible to rmmod ip(6)tables while icmp extensions were still in use.
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent b3f2aea7
...@@ -2082,6 +2082,7 @@ static struct xt_match ipt_builtin_mt[] __read_mostly = { ...@@ -2082,6 +2082,7 @@ static struct xt_match ipt_builtin_mt[] __read_mostly = {
.checkentry = icmp_checkentry, .checkentry = icmp_checkentry,
.proto = IPPROTO_ICMP, .proto = IPPROTO_ICMP,
.family = NFPROTO_IPV4, .family = NFPROTO_IPV4,
.me = THIS_MODULE,
}, },
}; };
......
...@@ -2084,6 +2084,7 @@ static struct xt_match ip6t_builtin_mt[] __read_mostly = { ...@@ -2084,6 +2084,7 @@ static struct xt_match ip6t_builtin_mt[] __read_mostly = {
.checkentry = icmp6_checkentry, .checkentry = icmp6_checkentry,
.proto = IPPROTO_ICMPV6, .proto = IPPROTO_ICMPV6,
.family = NFPROTO_IPV6, .family = NFPROTO_IPV6,
.me = THIS_MODULE,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment