Received: by 10.223.185.116 with SMTP id b49csp1107314wrg; Fri, 23 Feb 2018 12:03:59 -0800 (PST) X-Google-Smtp-Source: AH8x226ldpimn0qESUbC2xkr6QbifN0tSbBbeQvYxRcVTZuBjjylUmfwkJi69JDRyhr9iakDPmlV X-Received: by 10.101.85.67 with SMTP id t3mr2318443pgr.310.1519416238906; Fri, 23 Feb 2018 12:03:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519416238; cv=none; d=google.com; s=arc-20160816; b=qR3ELYRameq3AZLCrfLW6Pt95LW9vywF0cDhdNS7hiJaR3Eu5ac1Q1vofk99JOuP/8 kRlaSS2yx2fcqlowDjMAIJWWCp6hqFIy/I6qfFxQz0UD6Dh0F+qAaupGrSWDZNjkxy63 pY5otWPB/DgqkBqANqWzkTWXizIxIuMgxPi4agQMlF+jAsYtm33gJJLqCGl5aiBNBKQg npnCa1DbDnFa/jhLnRU7RhqW5MvIjcS4WvKevLhBnCgv5gBpf+aOK1CJ63ruV4cn1Z/8 BXAflyf1detm+nkGWEvkqCHjiZkQ3EXkhMqrp+XvGjfxEWBODnzdWjfbbM2Kr6ggJ4Gv x4uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=SspVtpEm6X54jP68Cer29UWNRIEO2dCxJT8rOU3IH4E=; b=SAYhxGWmlYcGkSoE+pscppTwULv7oUwIvaHxQdgn5cy+bIChcGZa8oM3Ird3wuBpVo weOxDSEFz4NKbEKECxqEu+2VtaWZkjWdmtXINur6XsPGEiTkV8u9NQJhjOBbgbieD8Yl kyBPbrBprNb9o9HKu/DyaBNRzF1xMwCMsJrDfvaUtIGMewmpqUSMUG6SQs1T3mKvjwrh oGFFZqRAsRkAOfdzHl2Wn76GRjyIYpJDX2csG8oRsPLe18t3EOBW0xL80AfBEYewKliY Mug/XGq+dK7TxOpLRHjlr0x75QO4EX1syeRFpf+OQ2E9LHqZ1ehU5a9DQR0d0c1HiQn7 gksg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16si2259657pfj.149.2018.02.23.12.03.42; Fri, 23 Feb 2018 12:03:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933237AbeBWSnM (ORCPT + 99 others); Fri, 23 Feb 2018 13:43:12 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:42104 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933219AbeBWSnK (ORCPT ); Fri, 23 Feb 2018 13:43:10 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5939A10BE; Fri, 23 Feb 2018 18:43:09 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+4fbcfcc0d2e6592bd641@syzkaller.appspotmail.com, Pablo Neira Ayuso , Cong Wang Subject: [PATCH 4.9 026/145] netfilter: xt_cgroup: initialize info->priv in cgroup_mt_check_v1() Date: Fri, 23 Feb 2018 19:25:32 +0100 Message-Id: <20180223170728.199612968@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170724.669759283@linuxfoundation.org> References: <20180223170724.669759283@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Cong Wang 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: Fixes: c38c4597e4bf ("netfilter: implement xt_cgroup cgroup2 path match") Cc: Pablo Neira Ayuso Signed-off-by: Cong Wang Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- 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)) {