lkml.org 
[lkml]   [2018]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 026/145] netfilter: xt_cgroup: initialize info->priv in cgroup_mt_check_v1()
    Date
    4.9-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Cong Wang <xiyou.wangcong@gmail.com>

    commit ba7cd5d95f25cc6005f687dabdb4e7a6063adda9 upstream.

    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>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    net/netfilter/xt_cgroup.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/net/netfilter/xt_cgroup.c
    +++ b/net/netfilter/xt_cgroup.c
    @@ -52,6 +52,7 @@ static int cgroup_mt_check_v1(const stru
    return -EINVAL;
    }

    + info->priv = NULL;
    if (info->has_path) {
    cgrp = cgroup_get_from_path(info->path);
    if (IS_ERR(cgrp)) {

    \
     
     \ /
      Last update: 2018-02-23 21:03    [W:4.124 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site