From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3664BEB64DD for ; Tue, 25 Jul 2023 04:00:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230415AbjGYEAE convert rfc822-to-8bit (ORCPT ); Tue, 25 Jul 2023 00:00:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjGYEAC (ORCPT ); Tue, 25 Jul 2023 00:00:02 -0400 Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BDE7E63; Mon, 24 Jul 2023 20:59:59 -0700 (PDT) Received: from omf02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 20C7080C2F; Tue, 25 Jul 2023 03:59:58 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA id 2290E80011; Tue, 25 Jul 2023 03:59:54 +0000 (UTC) Message-ID: Subject: Re: [PATCH v2] net/sched: mqprio: Add length check for TCA_MQPRIO_{MAX/MIN}_RATE64 From: Joe Perches To: Jakub Kicinski , Lin Ma Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 24 Jul 2023 20:59:53 -0700 In-Reply-To: <20230724175612.0649ef67@kernel.org> References: <20230724014625.4087030-1-linma@zju.edu.cn> <20230724160214.424573ac@kernel.org> <63d69a72.e2656.1898a66ca22.Coremail.linma@zju.edu.cn> <20230724175612.0649ef67@kernel.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Rspamd-Queue-Id: 2290E80011 X-Rspamd-Server: rspamout02 X-Stat-Signature: pfoa6zkd97urjqig91rfqziy9dxshx1z X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1/rXK+VvLRmSU9hJpGx/V0W8f9Xio6qIaY= X-HE-Tag: 1690257594-896861 X-HE-Meta: U2FsdGVkX1+tPyC8Ex/CoDBWhIFvRwqs6zPa1VN5SRwaGqsRwVXKaMwWZi+VDAtfc2xUi/0365kyAMP+Tr2jVJz1ELWB596iYoaa/9nK6QBF8Ietsow6FDVV01hMdaw3jlehH9kBsqZxlA/B15EskgYf8XprGhL9+DN80ALAJ5d3p4Mdy0T92dTRoq022y77TFgKo1cB5PhFMqx7Lzf4gdhqNLpOA+HTk3Bd/eL2x3dVS0Kvq+gVuTXi5l8wCAgYpJ9hHbj36fVY3rxLEZtw8BUDPN6mY9D2PvHE2AOsrJEHBoZmCGlOgR/hgmMnembt Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2023-07-24 at 17:56 -0700, Jakub Kicinski wrote: > On Tue, 25 Jul 2023 08:15:39 +0800 (GMT+08:00) Lin Ma wrote: > > > > The nla_for_each_nested parsing in function mqprio_parse_nlattr() does > > > > not check the length of the nested attribute. This can lead to an > > > > out-of-attribute read and allow a malformed nlattr (e.g., length 0) to > > > > be viewed as 8 byte integer and passed to priv->max_rate/min_rate. > > > > > > > > This patch adds the check based on nla_len() when check the nla_type(), > > > > which ensures that the length of these two attribute must equals > > > > sizeof(u64). > > > > > > How do you run get_maintainer? You didn't CC the author of the code. > > > > That's weird, I just ran code below and send this patch to all 9 emails poped out. > > > > # ./scripts/get_maintainer.pl net/sched/sch_mqprio.c > > Joe, here's another case. What do you think the "case" is here? Do you think John Fastabend, who hasn't touched the file in 7+ years should be cc'd? Why? > Lin Ma, you need to run the script on the file generated by > git format-patch, rather than the file path. That gives better > coverage for keywords included in the commit message (especially > the Fixes tag). Please rerun it on the patch and repost with > the right CC list.