Bug 2039003 (CVE-2022-0175) - CVE-2022-0175 virglrenderer: memory initialization issue in vrend_resource_alloc_buffer() can lead to info leak
Summary: CVE-2022-0175 virglrenderer: memory initialization issue in vrend_resource_al...
Keywords:
Status: NEW
Alias: CVE-2022-0175
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 2039343 2039342 2048503 2048504
Blocks: 2039004 2039007
TreeView+ depends on / blocked
 
Reported: 2022-01-10 17:52 UTC by Pedro Sampaio
Modified: 2023-07-07 08:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the VirGL virtual OpenGL renderer (virglrenderer). The virgl did not properly initialize memory when allocating a host-backed memory resource. A malicious guest could use this flaw to mmap from the guest kernel and read this uninitialized memory from the host, possibly leading to information disclosure.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Pedro Sampaio 2022-01-10 17:52:24 UTC
The virgl forgets to initialize the memory pointed by the res->ptr when it
creates resource. And the memory can be mapped to the guest kernel when the
VIRTIO_GPU_CMD_RESOURCE_ATTACH_BACKING is issued. However, the guest
userspace can read the data in the unintialized host memory by mmaping it
from the guest kernel.

Upstream fix:

https://gitlab.freedesktop.org/virgl/virglrenderer/-/commit/b05bb61f454eeb8a85164c8a31510aeb9d79129c

Comment 1 Pedro Sampaio 2022-01-11 14:22:42 UTC
Created virglrenderer tracking bugs for this issue:

Affects: epel-8 [bug 2039343]
Affects: fedora-all [bug 2039342]

Comment 2 Mauro Matteo Cascella 2022-01-31 11:43:25 UTC
Upstream MR:
https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/654


Note You need to log in before you can comment on or make changes to this bug.