[PULL 3/3] hw/usb/hcd-dwc2: fix divide-by-zero in dwc2_handle_packet()

2020-10-19 Thread Gerd Hoffmann
From: Mauro Matteo Cascella Check the value of mps to avoid potential divide-by-zero later in the function. Since HCCHAR_MPS is guest controllable, this prevents a malicious/buggy guest from crashing the QEMU process on the host. Signed-off-by: Mauro Matteo Cascella Reviewed-by: Paul Zimmerman

[PULL 3/3] hw/usb/hcd-dwc2: fix divide-by-zero in dwc2_handle_packet()

2020-10-15 Thread Gerd Hoffmann
From: Mauro Matteo Cascella Check the value of mps to avoid potential divide-by-zero later in the function. Since HCCHAR_MPS is guest controllable, this prevents a malicious/buggy guest from crashing the QEMU process on the host. Signed-off-by: Mauro Matteo Cascella Reviewed-by: Paul Zimmerman