summaryrefslogtreecommitdiff
path: root/net/netfilter
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2019-06-07 17:37:30 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2019-06-17 17:36:30 +0300
commit9911c1139fd072594ac259c2ce055b004ca92f49 (patch)
tree411d03f314f77a5ab2d3ebfa584e200162280534 /net/netfilter
parent87e389b4c20091b562bd65d90272f9d7c67eb437 (diff)
downloadlinux-9911c1139fd072594ac259c2ce055b004ca92f49.tar.xz
netfilter: xt_owner: bail out with EINVAL in case of unsupported flags
Reject flags that are not supported with EINVAL. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/xt_owner.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/netfilter/xt_owner.c b/net/netfilter/xt_owner.c
index a8784502aca6..ee597fdc5db7 100644
--- a/net/netfilter/xt_owner.c
+++ b/net/netfilter/xt_owner.c
@@ -25,6 +25,9 @@ static int owner_check(const struct xt_mtchk_param *par)
struct xt_owner_match_info *info = par->matchinfo;
struct net *net = par->net;
+ if (info->match & ~XT_OWNER_MASK)
+ return -EINVAL;
+
/* Only allow the common case where the userns of the writer
* matches the userns of the network namespace.
*/