Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3985356rwo; Mon, 24 Jul 2023 21:39:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlF4L2bJmT2CjZ9fLDv9J3sl8SwEP8MB7eZdM78oWlFAib2p9tl6Swq3YXRl56d00dYvWsvH X-Received: by 2002:a05:6358:724c:b0:133:9e8:ef9a with SMTP id i12-20020a056358724c00b0013309e8ef9amr8024609rwa.28.1690259951478; Mon, 24 Jul 2023 21:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690259951; cv=none; d=google.com; s=arc-20160816; b=t0sk2yG3lA/Se2zr/ghYJ6ayfxTSBKLqaXsWWnlrBLUAXTroTITbZW5Y2zoKgGr89C /Yn9n7HzR0xtwbRLzJNy2ljJVhuE0+Rg6tic5OqSX7YhpWW7F7Z1YMEK6Ux0gVEwAo7k xIeIc6wMd4TRiEXyvTG6W0ociV1Njlyz04FAP7GdU5x2JBOk88jw1XX5ZlqIFhQ7Q0uq IxyDtpSXeYsNWe3xGstpCqG32Dk04FeAbgNtpCVB8kvXty9lj8SRorbtM9O3DtcT3tZL NRdYVhrXijADa/YpYtRvp2Or+FduzPHBNisDZZoXsMFDcXhkef1KXZ2W3mQdupdmmtE4 kXmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=MLRHu2BgXePgNpsGsiBiF/wl2lRYjQ32Pc7adZWhup8=; fh=TL18PQOXlyKHWmcYgYCftPeFUJbd4E98nPrg4SuslbE=; b=d1ME3SKIFFZADEm8MJ8sdin2SM+A4fah6w7KiNc0ak4142/m9TaD/NQPaaKcKIBhKJ +58QyWevmWNv9X6GP9Rh0U5vV0CHYK0QK08eMBry8YB8u/6iQTaZdd6zF2Qj3ZnJ9xGe Powzg4CQUVGLxdmvGKvCvE/RnjAbFjj4c4CdKDaufVh6SNvLQnF7L2Fbq2VIWGUwsM7k 5/lFEU3/g2WjEtVrS3zTaWLZaH5aeKiENYFWM4Elqd1qAM7P4sdXqquUvqyxlrXckEIH /1OQRaEP/YneU9XS9dp8zS4vgNI6QNIgGbWdx49oKFnJesuHdl+NNWwrb+tEyvkoQqLQ ZJzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b6-20020a639306000000b00563b6cfc1b9si3339937pge.612.2023.07.24.21.38.59; Mon, 24 Jul 2023 21:39:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230266AbjGYEAD convert rfc822-to-8bit (ORCPT + 99 others); Tue, 25 Jul 2023 00:00:03 -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-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 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 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.