From: Stefan Hajnoczi <stefanha@gmail.com>
To: Dima Stepanov <dimastep@yandex-team.ru>
Cc: mst@redhat.com, qemu-devel@nongnu.org, wrfsh@yandex-team.ru
Subject: Re: [Qemu-devel] [PATCH v1] virtio: add checks for the size of the indirect table
Date: Tue, 15 Jan 2019 14:27:39 +0000 [thread overview]
Message-ID: <20190115142739.GD29056@stefanha-x1.localdomain> (raw)
In-Reply-To: <1547546927-18006-1-git-send-email-dimastep@yandex-team.ru>
[-- Attachment #1: Type: text/plain, Size: 933 bytes --]
On Tue, Jan 15, 2019 at 01:08:47PM +0300, Dima Stepanov wrote:
> The virtqueue_pop() and virtqueue_get_avail_bytes() routines can use the
> INDIRECT table to get the data. It is possible to create a packet which
> will lead to the assert message like:
> include/exec/memory.h:1995: void
> address_space_read_cached(MemoryRegionCache *, hwaddr, void *, int):
> Assertion `addr < cache->len && len <= cache->len - addr' failed.
> Aborted
> To do it the first descriptor should have a link to the INDIRECT table
> and set the size of it to 0. It doesn't look good that the guest should
> be able to trigger the assert in qemu. Add additional check for the size
> of the INDIRECT table, which should not be 0.
>
> Signed-off-by: Dima Stepanov <dimastep@yandex-team.ru>
> ---
> hw/virtio/virtio.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
prev parent reply other threads:[~2019-01-15 14:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 10:08 [Qemu-devel] [PATCH v1] virtio: add checks for the size of the indirect table Dima Stepanov
2019-01-15 10:36 ` Philippe Mathieu-Daudé
2019-01-15 10:40 ` Cornelia Huck
2019-01-15 13:11 ` Dima Stepanov
2019-01-15 13:38 ` Cornelia Huck
2019-01-15 19:05 ` Michael S. Tsirkin
2019-01-15 14:27 ` Stefan Hajnoczi [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=20190115142739.GD29056@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=dimastep@yandex-team.ru \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wrfsh@yandex-team.ru \
/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).