From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Haiyang Zhang <haiyangz@microsoft.com>
Cc: "sashal@kernel.org" <sashal@kernel.org>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
KY Srinivasan <kys@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
"olaf@aepfle.de" <olaf@aepfle.de>, vkuznets <vkuznets@redhat.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net,v2 1/2] hv_netvsc: Fix offset usage in netvsc_send_table()
Date: Thu, 21 Nov 2019 17:03:35 -0800 [thread overview]
Message-ID: <20191121170335.2f73792d@cakuba.netronome.com> (raw)
In-Reply-To: <MN2PR21MB13750EBD53CFDFCBA36CF1D8CA490@MN2PR21MB1375.namprd21.prod.outlook.com>
On Fri, 22 Nov 2019 00:54:20 +0000, Haiyang Zhang wrote:
> > >
> > > - tab = (u32 *)((unsigned long)&nvmsg->msg.v5_msg.send_table +
> > > - nvmsg->msg.v5_msg.send_table.offset);
> > > + if (offset > msglen - count * sizeof(u32)) {
> >
> > Can't this underflow now? What if msglen is small?
> msglen came from the vmbus container message. We trust it to be big
> enough for the data region.
Ok, it looked like it was read from some descriptor which could
potentially be controlled by "the other side" but I trust your
judgement :)
Both patches LGTM, then.
next prev parent reply other threads:[~2019-11-22 1:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-21 21:33 [PATCH net,v2 0/2] Fix send indirection table offset Haiyang Zhang
2019-11-21 21:33 ` [PATCH net,v2 1/2] hv_netvsc: Fix offset usage in netvsc_send_table() Haiyang Zhang
2019-11-21 23:04 ` Jakub Kicinski
2019-11-22 0:54 ` Haiyang Zhang
2019-11-22 1:03 ` Jakub Kicinski [this message]
2019-11-21 21:33 ` [PATCH net,v2 2/2] hv_netvsc: Fix send_table offset in case of a host bug Haiyang Zhang
2019-11-22 8:04 ` [PATCH net,v2 0/2] Fix send indirection table offset David Miller
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=20191121170335.2f73792d@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=davem@davemloft.net \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=sashal@kernel.org \
--cc=sthemmin@microsoft.com \
--cc=vkuznets@redhat.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).