Bug 2036998 (CVE-2021-4206)

Summary: CVE-2021-4206 QEMU: QXL: integer overflow in cursor_alloc() can lead to heap buffer overflow
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: berrange, carnil, cfergeau, crobinso, dbecker, eglynn, jen, jferlan, jforbes, jjoyce, jmaloy, jschluet, knoel, kraxel, lhh, lkundrak, lpeer, m.a.young, mburns, mcascell, mkenneth, mrezanin, mst, ondrejj, pbonzini, philmd, ribarry, rjones, sclewis, security-response-team, slinaber, spower, virt-maint, virt-maint, ymankad
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm 7.0.0 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the QXL display device emulation in QEMU. An integer overflow in the cursor_alloc() function can lead to the allocation of a small cursor object followed by a subsequent heap-based buffer overflow. This flaw allows a malicious privileged guest user to crash the QEMU process on the host or potentially execute arbitrary code within the context of the QEMU process.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-13 15:50:22 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: 2070903, 2040732, 2040733, 2040734, 2040735, 2070901, 2082622    
Bug Blocks: 2040471, 2054405    

Description Pedro Sampaio 2022-01-04 15:43:00 UTC
In the QEMU QXL video acelerator a integer overflow leads to heap overflow in qxl_unpack_chunks function.

Comment 4 Mauro Matteo Cascella 2022-04-01 10:10:56 UTC
Created qemu tracking bugs for this issue:

Affects: epel-7 [bug 2070903]
Affects: fedora-all [bug 2070901]

Comment 5 Mauro Matteo Cascella 2022-04-01 10:21:41 UTC
STAR Labs security advisory: https://starlabs.sg/advisories/21/21-4206.

Comment 6 Salvatore Bonaccorso 2022-04-07 04:25:49 UTC
Hi

Is CVE-2021-4206  here correct? The starlabs.sg advisory say it's CVE-2022-4206.

Regards,
salvatore

Comment 7 Mauro Matteo Cascella 2022-04-07 08:00:13 UTC
Hi Salvatore, this issue was discovered by STAR Labs in 2021 and CVE-2021-4206 is the correct CVE id. I asked them to update the page. Thank you for the heads up.

Comment 8 Salvatore Bonaccorso 2022-04-07 19:23:32 UTC
Hi Mauro,

(In reply to Mauro Matteo Cascella from comment #7)
> Hi Salvatore, this issue was discovered by STAR Labs in 2021 and
> CVE-2021-4206 is the correct CVE id. I asked them to update the page. Thank
> you for the heads up.

Thank you!

Regards,
Salvatore

Comment 10 Mauro Matteo Cascella 2022-04-08 15:39:38 UTC
Upstream fix:
https://gitlab.com/qemu-project/qemu/-/commit/fa892e9a

Comment 11 errata-xmlrpc 2022-06-13 11:51:28 UTC
This issue has been addressed in the following products:

  Advanced Virtualization for RHEL 8.4.0.EUS

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

Comment 12 Product Security DevOps Team 2022-06-13 15:50:18 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-4206

Comment 13 errata-xmlrpc 2022-08-02 10:01:06 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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