projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
627f91b
)
virtio-ccw: fix range check for SET_VQ
author
Cornelia Huck
<cornelia.huck@de.ibm.com>
Fri, 20 Mar 2015 12:08:36 +0000
(13:08 +0100)
committer
Cornelia Huck
<cornelia.huck@de.ibm.com>
Mon, 30 Mar 2015 07:25:17 +0000
(09:25 +0200)
VIRTIO_PCI_QUEUE_MAX is already too big; a malicious guest would be
able to trigger a write beyond the VirtQueue structure.
Cc: qemu-stable@nongnu.org
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/s390x/virtio-ccw.c
patch
|
blob
|
history
diff --git
a/hw/s390x/virtio-ccw.c
b/hw/s390x/virtio-ccw.c
index 130535cdc311bf9d6633268dc138fa01e374c1a2..ceb6a457035024e629728bd55f7edd637e00c9dc 100644
(file)
--- a/
hw/s390x/virtio-ccw.c
+++ b/
hw/s390x/virtio-ccw.c
@@
-266,7
+266,7
@@
static int virtio_ccw_set_vqs(SubchDev *sch, uint64_t addr, uint32_t align,
{
VirtIODevice *vdev = virtio_ccw_get_vdev(sch);
- if (index > VIRTIO_PCI_QUEUE_MAX) {
+ if (index >
=
VIRTIO_PCI_QUEUE_MAX) {
return -EINVAL;
}