s390x/virtio-hcall: Add range check for hypervisor call
commitf2c55d1735175ab37ab9f69854460087112d2756
authorThomas Huth <thuth@linux.vnet.ibm.com>
Mon, 13 Jan 2014 08:26:49 +0000 (13 09:26 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 27 Feb 2014 08:51:25 +0000 (27 09:51 +0100)
tree5e14a0e7a610e52dab8cfa72f8d5dd0ad102ec71
parent0788082a4b3f41cb453b654d1a66f87adfa794a9
s390x/virtio-hcall: Add range check for hypervisor call

The handler for diag 500 did not check whether the requested function
was in the supported range, so illegal values could crash QEMU in the
worst case.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
CC: qemu-stable@nongnu.org
hw/s390x/s390-virtio-hcall.c