Bug 2140567 (CVE-2022-3872)

Summary: CVE-2022-3872 QEMU: sdhci: buffer data port register off-by-one read/write
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: ddepaula, eglynn, jen, jferlan, jjoyce, jmaloy, knoel, lhh, mburns, mgarciac, mkenneth, mrezanin, mst, pbonzini, spower, virt-maint, XRivenDell
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
An off-by-one read/write issue was found in the SDHCI device of QEMU. It occurs when reading/writing the Buffer Data Port Register in sdhci_read_dataport and sdhci_write_dataport, respectively, if data_count == block_size. A malicious guest could use this flaw to crash the QEMU process on the host, resulting in a denial of service condition.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-04 09:02:54 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: 2140584, 2140585    
Bug Blocks: 2087158    

Description Mauro Matteo Cascella 2022-11-07 09:33:47 UTC
An off-by-one read/write issue was found in the SDHCI device of QEMU. It occurs when reading/writing the Buffer Data Port Register in sdhci_read_dataport and sdhci_write_dataport, respectively, if data_count == block_size. A malicious guest could use this flaw to crash the QEMU process on the host, resulting in a denial of service condition.

Comment 1 Mauro Matteo Cascella 2022-11-07 10:16:32 UTC
Created qemu tracking bugs for this issue:

Affects: epel-all [bug 2140585]
Affects: fedora-all [bug 2140584]

Comment 2 Mauro Matteo Cascella 2022-11-07 11:16:16 UTC
*** Bug 2083064 has been marked as a duplicate of this bug. ***

Comment 3 Mauro Matteo Cascella 2022-11-07 11:18:31 UTC
Proposed patch:
https://lists.nongnu.org/archive/html/qemu-devel/2022-11/msg01068.html

Comment 4 Mauro Matteo Cascella 2022-11-08 09:19:16 UTC
(better) patch by Philippe Mathieu-Daudé:
https://lists.nongnu.org/archive/html/qemu-devel/2022-11/msg01161.html

Comment 5 Product Security DevOps Team 2022-12-04 09:02:52 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-2022-3872

Comment 6 Mauro Matteo Cascella 2023-01-02 11:29:36 UTC
Not yet merged upstream due to a CI failure:
https://lists.nongnu.org/archive/html/qemu-devel/2022-11/msg01504.html