Bug 2035002 (CVE-2021-4158)

Summary: CVE-2021-4158 QEMU: NULL pointer dereference in pci_write() in hw/acpi/pcihp.c
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: berrange, cfergeau, cixamif366, cofabim386, crobinso, dbecker, drjones, jen, jferlan, jforbes, jjoyce, jmaloy, jschluet, kkiwi, knoel, lhh, lkundrak, lpeer, m.a.young, mburns, mkenneth, mrezanin, mst, ondrejj, pbonzini, rjones, sclewis, sct, slinaber, virt-maint, virt-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 NULL pointer dereference issue was found in the ACPI code of QEMU. A malicious, privileged user within the 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-05-10 18:16:33 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: 2036574, 2036579, 2036580, 2036581    
Bug Blocks: 2034575    

Description Mauro Matteo Cascella 2021-12-22 17:07:54 UTC
A NULL pointer dereference was found in the ACPI code of QEMU. The flaw lies in hw/acpi/pcihp.c in pci_write() where the `bus` pointer is used without checking if it's NULL, probably because an invalid selector was supplied. A malicious privileged user within the guest could use this flaw to crash the QEMU process on the host, resulting in a denial of service condition.

Upstream issue:
https://gitlab.com/qemu-project/qemu/-/issues/770

Upstream patch:
https://lists.nongnu.org/archive/html/qemu-devel/2021-12/msg01491.html

Comment 2 Philippe Mathieu-Daudé 2021-12-22 19:16:07 UTC
Updated upstream patch: https://www.mail-archive.com/qemu-devel@nongnu.org/msg857944.html (not listing any CVE)

Comment 3 Mauro Matteo Cascella 2022-01-03 09:06:31 UTC
Created qemu tracking bugs for this issue:

Affects: fedora-all [bug 2036574]

Comment 14 errata-xmlrpc 2022-05-10 13:17:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:1759 https://access.redhat.com/errata/RHSA-2022:1759

Comment 15 Product Security DevOps Team 2022-05-10 18:16:30 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-2021-4158

Comment 16 errata-xmlrpc 2022-11-15 09:50:02 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:7967 https://access.redhat.com/errata/RHSA-2022:7967