Bug 2218486 (CVE-2023-3255)

Summary: CVE-2023-3255 QEMU: VNC: infinite loop in inflate_buffer() leads to denial of service
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: ddepaula, jen, jferlan, jmaloy, knoel, mkenneth, mrezanin, mst, pbonzini, virt-maint, ymankad
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: qemu 8.1.0-rc0 Doc Type: ---
Doc Text:
A flaw was found in the QEMU built-in VNC server while processing ClientCutText messages. A wrong exit condition may lead to an infinite loop when inflating an attacker controlled zlib buffer in the `inflate_buffer` function. This could allow a remote authenticated client who is able to send a clipboard to the VNC server to trigger a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 2218488, 2218489, 2219543    
Bug Blocks: 2203252    

Description Mauro Matteo Cascella 2023-06-29 10:52:04 UTC
The `vnc_client_cut_text_ext` function in ui/vnc-clipboard.c calls `inflate_buffer` with an attacker controlled buffer (size, data). There is a wrong exit condition in `inflate_buffer` which can trigger an infinite loop. A remote authenticated client who is able to send a clipboard to the QEMU built-in VNC server can trigger this flaw and cause a denial of service.

Comment 3 Mauro Matteo Cascella 2023-07-04 08:52:01 UTC
Proposed patch:
https://lists.nongnu.org/archive/html/qemu-devel/2023-07/msg00596.html

Comment 4 Mauro Matteo Cascella 2023-07-04 08:52:25 UTC
Created qemu tracking bugs for this issue:

Affects: fedora-all [bug 2219543]

Comment 6 Mauro Matteo Cascella 2023-07-24 16:00:48 UTC
Upstream commit:
https://gitlab.com/qemu-project/qemu/-/commit/d921fea3

Comment 7 errata-xmlrpc 2024-04-30 09:35:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:2135 https://access.redhat.com/errata/RHSA-2024:2135