From: Jason Wang <jasowang@redhat.com>
To: Peter Crosthwaite <crosthwaitepeter@gmail.com>
Cc: "Peter Crosthwaite" <crosthwaite.peter@gmail.com>,
"Alistair Francis" <alistair.francis@xilinx.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
"Prasad Pandit" <ppandit@redhat.com>,
qemu-arm <qemu-arm@nongnu.org>, 刘令 <liuling-it@360.cn>
Subject: Re: [Qemu-devel] [PATCH] cadence_gem: fix buffer overflow
Date: Mon, 18 Jan 2016 17:57:22 +0800 [thread overview]
Message-ID: <569CB702.1060803@redhat.com> (raw)
In-Reply-To: <CAPokK=qhk15US4a-OHLFo=U2GReQv45dT4oL6z=Hu0m8Bkf74Q@mail.gmail.com>
On 01/18/2016 05:08 PM, Peter Crosthwaite wrote:
> On Mon, Jan 18, 2016 at 12:12 AM, Jason Wang <jasowang@redhat.com> wrote:
>>
>> On 01/18/2016 03:04 PM, Peter Crosthwaite wrote:
>>> On Sun, Jan 17, 2016 at 10:50 PM, Jason Wang <jasowang@redhat.com> wrote:
>>>> On 01/14/2016 05:43 PM, Michael S. Tsirkin wrote:
>>>>> gem_receive copies a packet received from network into an rxbuf[2048]
>>>>> array on stack, with size limited by descriptor length set by guest. If
>>>>> guest is malicious and specifies a descriptor length that is too large,
>>>>> and should packet size exceed array size, this results in a buffer
>>>>> overflow.
>>>>>
>>>>> Reported-by: 刘令 <liuling-it@360.cn>
>>>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>>>>> ---
>>>>> hw/net/cadence_gem.c | 8 ++++++++
>>>>> 1 file changed, 8 insertions(+)
>>>> Apply to my -net with tweak on commit log (changing receive to transmit
>>>> as noticed).
>>>>
>>> As this is actually an unimplemented feature you should change the
>>> message to a LOG_UNIMP rather than a debug printf.
>>>
>>> Regards,
>>> Peter
>> Thanks for the reminding. But we need know the whether real device could
>> send packet whose length is greater than 2048. Do you know the link to
>> the manual? (Haven't fond it in cadence page.) A hint is the linux
> Xilinx UG585 has details:
>
> http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf
>
> Regards,
> Peter
>
>
Thanks for the pointer.
In section 16.1.5, it said
"Jumbo frames are not supported."
So it was in fact not an unimplemented feature?
next prev parent reply other threads:[~2016-01-18 9:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-14 9:43 [Qemu-devel] [PATCH] cadence_gem: fix buffer overflow Michael S. Tsirkin
2016-01-14 10:03 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2016-01-14 10:11 ` Michael S. Tsirkin
2016-01-15 6:19 ` Peter Crosthwaite
2016-01-15 8:06 ` P J P
2016-01-16 0:20 ` Alistair Francis
2016-01-16 5:23 ` P J P
2016-01-18 3:14 ` Jason Wang
2016-01-14 10:23 ` [Qemu-devel] " P J P
2016-01-15 3:16 ` Jason Wang
2016-01-15 5:39 ` P J P
2016-01-18 6:50 ` Jason Wang
2016-01-18 7:04 ` Peter Crosthwaite
2016-01-18 8:12 ` Jason Wang
2016-01-18 9:08 ` Peter Crosthwaite
2016-01-18 9:57 ` Jason Wang [this message]
2016-01-18 10:06 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2016-01-18 16:54 ` Alistair Francis
2016-01-19 2:48 ` Jason Wang
2016-01-19 2:48 ` Jason Wang
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=569CB702.1060803@redhat.com \
--to=jasowang@redhat.com \
--cc=alistair.francis@xilinx.com \
--cc=crosthwaite.peter@gmail.com \
--cc=crosthwaitepeter@gmail.com \
--cc=liuling-it@360.cn \
--cc=mst@redhat.com \
--cc=ppandit@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).