Bug 1890653 (CVE-2020-27661)

Summary: CVE-2020-27661 QEMU: divide by zero in dwc2_handle_packet() in hw/usb/hcd-dwc2.c
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: ailan, amit, berrange, cfergeau, dbecker, drjones, dwmw2, imammedo, itamar, jen, jferlan, jforbes, jjoyce, jmaloy, jschluet, knoel, lhh, lkundrak, lpeer, m.a.young, mburns, mkenneth, mrezanin, mst, pbonzini, ribarry, rjones, robinlee.sysu, sclewis, slinaber, virt-maint, virt-maint, vkuznets, xen-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A divide-by-zero flaw was found in QEMU in the dwc-hsotg (dwc2) USB host controller emulation. More specifically, HCCHAR_MPS was read from a device register and later used as a divisor without performing a sanity check. This flaw allows a malicious or buggy guest to crash the QEMU process on the host, resulting in a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-22 20:21:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1890654, 1910669    
Bug Blocks: 1882704    

Description Mauro Matteo Cascella 2020-10-22 16:35:57 UTC
A divide-by-zero issue was found in QEMU in the dwc-hsotg (dwc2) USB host controller emulation. More specifically, HCCHAR_MPS was read from a device register and later used as divisor without performing any sanity check. This could allow a malicious/buggy guest to crash the QEMU process on the host, resulting in a denial of service.

Upstream fix:
https://lists.nongnu.org/archive/html/qemu-devel/2020-10/msg04263.html

Comment 1 Mauro Matteo Cascella 2020-10-22 16:36:30 UTC
Created qemu tracking bugs for this issue:

Affects: fedora-all [bug 1890654]

Comment 2 Mauro Matteo Cascella 2020-10-22 16:52:35 UTC
Statement:

This flaw did not affect the following versions of QEMU as they did not include support for dwc2 USB host controller emulation:
* `qemu-kvm-ma` as shipped with Red Hat Enterprise Linux 7.
* `qemu-kvm-rhev` as shipped with Red Hat Virtualization and Red Hat OpenStack.
* `qemu-kvm` as shipped with Red Hat Enterprise Linux 6, 7, 8, and RHEL Advanced Virtualization.

Comment 3 Product Security DevOps Team 2020-10-22 20:21:26 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-27661

Comment 5 Mauro Matteo Cascella 2020-10-23 12:53:18 UTC
Acknowledgments:

Name: Gaoning Pan (Ant Security Light-Year Lab), Xingwei Lin (Ant Security Light-Year Lab)