netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "Lin Ma" <linma@zju.edu.cn>, Joe Perches <joe@perches.com>
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
Subject: Re: [PATCH v2] net/sched: mqprio: Add length check for TCA_MQPRIO_{MAX/MIN}_RATE64
Date: Mon, 24 Jul 2023 17:56:12 -0700	[thread overview]
Message-ID: <20230724175612.0649ef67@kernel.org> (raw)
In-Reply-To: <63d69a72.e2656.1898a66ca22.Coremail.linma@zju.edu.cn>

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.

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.
-- 
pw-bot: cr

  reply	other threads:[~2023-07-25  0:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24  1:46 [PATCH v2] net/sched: mqprio: Add length check for TCA_MQPRIO_{MAX/MIN}_RATE64 Lin Ma
2023-07-24 21:29 ` Victor Nogueira
2023-07-24 23:02 ` Jakub Kicinski
2023-07-25  0:15   ` Lin Ma
2023-07-25  0:56     ` Jakub Kicinski [this message]
2023-07-25  1:33       ` Lin Ma
2023-07-25  3:59       ` Joe Perches
2023-07-25 19:38         ` Jakub Kicinski
2023-07-25 19:50           ` Joe Perches
2023-07-25 19:56             ` Jakub Kicinski
2023-07-25 21:04               ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230724175612.0649ef67@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=joe@perches.com \
    --cc=linma@zju.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).