aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_cgroup.c
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2018-01-31 15:02:47 -0800
committerPablo Neira Ayuso <pablo@netfilter.org>2018-02-02 18:26:37 +0100
commitba7cd5d95f25cc6005f687dabdb4e7a6063adda9 (patch)
tree8301371a48f9eb2fcfc3d72fb3c945d47793efaf /net/netfilter/xt_cgroup.c
parentnetfilter: flowtable infrastructure depends on NETFILTER_INGRESS (diff)
downloadlinux-dev-ba7cd5d95f25cc6005f687dabdb4e7a6063adda9.tar.xz
linux-dev-ba7cd5d95f25cc6005f687dabdb4e7a6063adda9.zip
netfilter: xt_cgroup: initialize info->priv in cgroup_mt_check_v1()
xt_cgroup_info_v1->priv is an internal pointer only used for kernel, we should not trust what user-space provides. Reported-by: <syzbot+4fbcfcc0d2e6592bd641@syzkaller.appspotmail.com> Fixes: c38c4597e4bf ("netfilter: implement xt_cgroup cgroup2 path match") Cc: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/xt_cgroup.c')
-rw-r--r--net/netfilter/xt_cgroup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netfilter/xt_cgroup.c b/net/netfilter/xt_cgroup.c
index 1db1ce59079f..891f4e7e8ea7 100644
--- a/net/netfilter/xt_cgroup.c
+++ b/net/netfilter/xt_cgroup.c
@@ -52,6 +52,7 @@ static int cgroup_mt_check_v1(const struct xt_mtchk_param *par)
return -EINVAL;
}
+ info->priv = NULL;
if (info->has_path) {
cgrp = cgroup_get_from_path(info->path);
if (IS_ERR(cgrp)) {