Files
qemu/hw/usb
Gerd Hoffmann f243bb4b0d usb: fix setup_len init (CVE-2020-14364)
Store calculated setup_len in a local variable, verify it, and only
write it to the struct (USBDevice->setup_len) in case it passed the
sanity checks.

This prevents other code (do_token_{in,out} functions specifically)
from working with invalid USBDevice->setup_len values and overrunning
the USBDevice->setup_buf[] buffer.

Fixes: CVE-2020-14364
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-id: 20200825053636.29648-1-kraxel@redhat.com
(cherry picked from commit b946434f26)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2020-09-09 18:51:39 -05:00
..
2019-08-16 13:31:53 +02:00
2018-06-01 19:20:38 +03:00
2016-02-23 12:43:05 +00:00
2020-02-12 17:20:41 +01:00
2019-06-12 13:20:21 +02:00
2013-02-19 12:30:05 +01:00
2020-03-17 11:23:14 +00:00
2019-08-16 13:31:52 +02:00