Received: by 10.223.185.116 with SMTP id b49csp1057775wrg; Fri, 23 Feb 2018 11:08:11 -0800 (PST) X-Google-Smtp-Source: AH8x226cFsfIhdbWPdI22+RfYhtkOFzYbNzdPEWBgKsMmoI56vwLr4dgFG28t95RGFoMSMv5BiNK X-Received: by 10.98.150.82 with SMTP id c79mr2728452pfe.88.1519412891284; Fri, 23 Feb 2018 11:08:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519412891; cv=none; d=google.com; s=arc-20160816; b=N1zQco2cWhD6VTjI+Mm0p4YA6OFI3/JafP+SiJp7tkhonJHoxdnYbIVsF8RVpvk5lz iSV2Qjyb7ZjB7CRsJvc25QMjA8s/nFNQDZw4zyTRp6m9Y8BSuO1MuBk5B91ZjnMvwUYt JBmO4BK97+pVE5u5OChImYesEALqKuX4eoTdcrXA9lo+uDyliJqi4Dlp4bcDXBETVSfF FuPEa0Q7FJEPHs4EfZCrqnxrNWehRTtr+qeYYT9702hTYOElMfppA5+u24SEZj3weOlR FJ7Dzg6EDm2UExj7ANc63t8HJvBbzDNpVzbdKGM9QSIYlWpYm5wBmkuYLyD1ZGeU+T4E tN9w== 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=wT4FN/T/HIpBLDbA2fdyeuqfHmNisFOy1hXGGDma1vU=; b=RnGkf/mhcbEciI7bjPaSOsz4bRPuz6eHzmjX4KUWcIdpdI8lgK8XNTe8PPxJ+ZwewD 2MgDSBVzFvDJHvPk3cAbCY+GmixcmgxlFRmWuxzZLaf836Swv5fYIvz3AhfKY61wJuHy 3eQ+GcbAdp8HFVnFHL6TiZhRDz5IIZw1ssbBIzFVwGMd5otm9h/NOUTOTrl49MHNZ99a JHbbz34Uas4k2Xi1M6Fy4vM2XROvGvLBtAvb0pc7L/e/ADgcvvd3WjqWdDan+HNfzejM mzfbdoLsctxSQvNzSJVy/rmTPArlV1jeyuBeiBUClKsRn7ZhlWdCf1ZnluTF3alCseZV Ly8w== 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 11-v6si2159985plc.376.2018.02.23.11.07.56; Fri, 23 Feb 2018 11:08:11 -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 S935449AbeBWTHV (ORCPT + 99 others); Fri, 23 Feb 2018 14:07:21 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50204 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965398AbeBWS53 (ORCPT ); Fri, 23 Feb 2018 13:57:29 -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 8F1EAC40; Fri, 23 Feb 2018 18:57:28 +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.15 17/45] netfilter: xt_cgroup: initialize info->priv in cgroup_mt_check_v1() Date: Fri, 23 Feb 2018 19:28:56 +0100 Message-Id: <20180223170718.112995410@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170715.197760019@linuxfoundation.org> References: <20180223170715.197760019@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.15-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)) {