]> git.ipfire.org Git - thirdparty/qemu.git/commit
usb: sanity check setup_index+setup_len in post_load
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 3 Apr 2014 16:52:25 +0000 (19:52 +0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 21 Jul 2014 03:05:55 +0000 (22:05 -0500)
commit15c35dfd9299733e5391b65efd3e0356a01d01ad
tree40f24591189eb779e1b895149a1a030c97ff01ef
parente7ff13929f58acd1d21a50930fa500d6160f7356
usb: sanity check setup_index+setup_len in post_load

CVE-2013-4541

s->setup_len and s->setup_index are fed into usb_packet_copy as
size/offset into s->data_buf, it's possible for invalid state to exploit
this to load arbitrary data.

setup_len and setup_index should be checked to make sure
they are not negative.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
(cherry picked from commit 9f8e9895c504149d7048e9fc5eb5cbb34b16e49a)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/usb/bus.c