From: Cong Wang <xiyou.wangcong@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Haimin Zhang <tcs.kernel@gmail.com>,
Vinicius Costa Gomes <vinicius.gomes@intel.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>, David Miller <davem@davemloft.net>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
tcs_kernel@tencent.com
Subject: Re: [PATCH V2] fix array-index-out-of-bounds in taprio_change
Date: Mon, 30 Aug 2021 22:56:20 -0700 [thread overview]
Message-ID: <CAM_iQpWi083uZ5wMYA+coWtME=xQMy3pb-__9jaFqe9piFRSaQ@mail.gmail.com> (raw)
In-Reply-To: <20210830101456.21944dfe@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
On Mon, Aug 30, 2021 at 10:14 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Mon, 30 Aug 2021 11:30:06 +0000 patchwork-bot+netdevbpf@kernel.org
> wrote:
> > Hello:
> >
> > This patch was applied to netdev/net-next.git (refs/heads/master):
> >
> > On Mon, 30 Aug 2021 11:47:01 +0800 you wrote:
> > > From: Haimin Zhang <tcs_kernel@tencent.com>
> > >
> > > syzbot report an array-index-out-of-bounds in taprio_change
> > > index 16 is out of range for type '__u16 [16]'
> > > that's because mqprio->num_tc is lager than TC_MAX_QUEUE,so we check
> > > the return value of netdev_set_num_tc.
> > >
> > > [...]
> >
> > Here is the summary with links:
> > - [V2] fix array-index-out-of-bounds in taprio_change
> > https://git.kernel.org/netdev/net-next/c/efe487fce306
> >
> > You are awesome, thank you!
>
> https://lore.kernel.org/netdev/20210830091046.610ceb1b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/
>
> Oh, well...
I agree it is slightly better to make the check work in
taprio_parse_mqprio_opt(), but this patch is not bad either, we
need to check the return value of netdev_set_num_tc() for
completeness at least.
BTW, this patch should be landed in -net, not -net-next, as it
fixes a real bug reported by syzbot.
Thanks.
prev parent reply other threads:[~2021-08-31 5:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-30 3:47 [PATCH V2] fix array-index-out-of-bounds in taprio_change tcs.kernel
2021-08-30 11:30 ` patchwork-bot+netdevbpf
2021-08-30 17:14 ` Jakub Kicinski
2021-08-31 5:56 ` Cong Wang [this message]
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='CAM_iQpWi083uZ5wMYA+coWtME=xQMy3pb-__9jaFqe9piFRSaQ@mail.gmail.com' \
--to=xiyou.wangcong@gmail.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tcs.kernel@gmail.com \
--cc=tcs_kernel@tencent.com \
--cc=vinicius.gomes@intel.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).