Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1624726ybv; Fri, 21 Feb 2020 00:30:54 -0800 (PST) X-Google-Smtp-Source: APXvYqy73jCGD4ZKVHAp3HaRxs2TQ13NFTJ+4VZQFOrvRK2cnHS72ziJDSnQ1Yt9v3KqGOyKwyZq X-Received: by 2002:aca:54cc:: with SMTP id i195mr1037250oib.126.1582273854197; Fri, 21 Feb 2020 00:30:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582273854; cv=none; d=google.com; s=arc-20160816; b=ehVl9MLy54LSZ0k9As+hJ2tcpP/k9GkuJOO8KXY8Ft+S5AzM3V+rx09U0K2QWKad5d 1aXiR67won0xNEd0MdXGYHt62HBO8fMBeZRaFJ+1Bvu/xL6j/7wFKQr5lvhN3b1/GKOq J28/A6Th91sqt+Akl9aM8BBHVvhkbHs38ddM0psAqWQAq4qbMnlp2kISKdwLnT7JYhC5 6eKNG/ZzX189lGUSiFMGj+Mx5zPZ3cfnEYoXad8Fr1WOH3CrsSnj33ZOE85twKpfm3PA VQ4CUc8YTInRo13X3SaQPrFyy/Tgj+nrERPk4jSTbVotq8asmZfGX1d6VImt3V4ipncP yGjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KvztZFEQ3q0O6QEujmyeOOkZ2CbHMwDAlyQRQL28H+o=; b=VoKRGuQa7WA79WQ5YUPmgSW4nTbTwChTVYWcKrkEFhBR9+5OArlpLxCIL1BqlN25E8 L+jrncSya3tGszMGGML/VQCY7Zk8Eyq1FqwdUevDfKGtrS1Fq+hEtv4vukVIynTeySxD qNWbd+Y2clu/R21sxjpiGi/fs6BSH8XhCY6pJAMY6Kavqri/DsFhDvXCNNWZEbwAYAVi 9uCEdMFlOlc7HhV2rpJ344CrJmB//AKQOVdKCQzvrXUjUP7spAKQx0lCk1qBuF1aJNI7 GoFUAFzHJBBRoOW/O0CWZk6eVdSds1THBfsn3mtTSWvV0QTNGDVi4RdkqvgRxlhGuGJm Q18g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0ebTMRZE; 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 c11si456667oic.20.2020.02.21.00.30.42; Fri, 21 Feb 2020 00:30:54 -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; dkim=pass header.i=@kernel.org header.s=default header.b=0ebTMRZE; 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 S2387581AbgBUIQw (ORCPT + 99 others); Fri, 21 Feb 2020 03:16:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:53974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732822AbgBUIQr (ORCPT ); Fri, 21 Feb 2020 03:16:47 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A9F0E24670; Fri, 21 Feb 2020 08:16:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273007; bh=HsmyTgW75idF7iuMGXUO1k5TzyWMjEjPkqXtRHcA6M0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0ebTMRZE0PuYKq0LQODxDeTLrpntNizfh5lRZh1eAEFUgOxVd3l9e02mIq8VFQjkh ei38PjaBc1cWc6tKbQs7Tc3mMiE5TcdvIP0HNNur6JzjnKuH1KenXjJh2a1Tvroe9i WjaENbyWl7mt8MBA7iV+0esLNRIzCtonkLtzvbRw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Davide Caratti , Jiri Pirko , "David S. Miller" Subject: [PATCH 4.19 005/191] net/sched: matchall: add missing validation of TCA_MATCHALL_FLAGS Date: Fri, 21 Feb 2020 08:39:38 +0100 Message-Id: <20200221072251.539666828@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072250.732482588@linuxfoundation.org> References: <20200221072250.732482588@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Davide Caratti [ Upstream commit 1afa3cc90f8fb745c777884d79eaa1001d6927a6 ] unlike other classifiers that can be offloaded (i.e. users can set flags like 'skip_hw' and 'skip_sw'), 'cls_matchall' doesn't validate the size of netlink attribute 'TCA_MATCHALL_FLAGS' provided by user: add a proper entry to mall_policy. Fixes: b87f7936a932 ("net/sched: Add match-all classifier hw offloading.") Signed-off-by: Davide Caratti Acked-by: Jiri Pirko Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/sched/cls_matchall.c | 1 + 1 file changed, 1 insertion(+) --- a/net/sched/cls_matchall.c +++ b/net/sched/cls_matchall.c @@ -137,6 +137,7 @@ static void *mall_get(struct tcf_proto * static const struct nla_policy mall_policy[TCA_MATCHALL_MAX + 1] = { [TCA_MATCHALL_UNSPEC] = { .type = NLA_UNSPEC }, [TCA_MATCHALL_CLASSID] = { .type = NLA_U32 }, + [TCA_MATCHALL_FLAGS] = { .type = NLA_U32 }, }; static int mall_set_parms(struct net *net, struct tcf_proto *tp,