summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2019-06-07 16:37:30 +0200
committerSeung-Woo Kim <sw0312.kim@samsung.com>2019-07-05 15:23:06 +0900
commit957021d33261d054781731392e4ea8b564f6a353 (patch)
tree679fcbf3b077240e6035662845e549adfe8f9367 /net
parent8413c52116d57850c75e7ef04f4a37cab878cc6f (diff)
downloadlinux-artik7-957021d33261d054781731392e4ea8b564f6a353.tar.gz
linux-artik7-957021d33261d054781731392e4ea8b564f6a353.tar.bz2
linux-artik7-957021d33261d054781731392e4ea8b564f6a353.zip
netfilter: xt_owner: bail out with EINVAL in case of unsupported flagssubmit/tizen/20190705.061120accepted/tizen/unified/20190705.110618
Reject flags that are not supported with EINVAL. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> [sw0312.kim: backport from mainline to apply supplementary groups on netfilter] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I129a3a1fc8f54d5e4f0ae164e0036bad7cd67c64
Diffstat (limited to 'net')
-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 6423e48c88b1..7305492b22ad 100644
--- a/net/netfilter/xt_owner.c
+++ b/net/netfilter/xt_owner.c
@@ -22,6 +22,9 @@ static int owner_check(const struct xt_mtchk_param *par)
{
struct xt_owner_match_info *info = par->matchinfo;
+ if (info->match & ~XT_OWNER_MASK)
+ return -EINVAL;
+
/* For now only allow adding matches from the initial user namespace */
if ((info->match & (XT_OWNER_UID|XT_OWNER_GID)) &&
(current_user_ns() != &init_user_ns))