b946434f26
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 |
||
---|---|---|
.. | ||
bus.c | ||
ccid-card-emulated.c | ||
ccid-card-passthru.c | ||
ccid.h | ||
chipidea.c | ||
combined-packet.c | ||
core.c | ||
desc-msos.c | ||
desc.c | ||
desc.h | ||
dev-audio.c | ||
dev-hid.c | ||
dev-hub.c | ||
dev-mtp.c | ||
dev-network.c | ||
dev-serial.c | ||
dev-smartcard-reader.c | ||
dev-storage.c | ||
dev-uas.c | ||
dev-wacom.c | ||
hcd-dwc2.c | ||
hcd-dwc2.h | ||
hcd-ehci-pci.c | ||
hcd-ehci-sysbus.c | ||
hcd-ehci.c | ||
hcd-ehci.h | ||
hcd-musb.c | ||
hcd-ohci-pci.c | ||
hcd-ohci.c | ||
hcd-ohci.h | ||
hcd-uhci.c | ||
hcd-xhci-nec.c | ||
hcd-xhci.c | ||
hcd-xhci.h | ||
host-libusb.c | ||
host-stub.c | ||
host.h | ||
imx-usb-phy.c | ||
Kconfig | ||
libhw.c | ||
meson.build | ||
quirks-ftdi-ids.h | ||
quirks-pl2303-ids.h | ||
quirks.c | ||
quirks.h | ||
redirect.c | ||
trace-events | ||
trace.h | ||
tusb6010.c | ||
u2f-emulated.c | ||
u2f-passthru.c | ||
u2f.c | ||
u2f.h | ||
xen-usb.c |