Bug 2037790 (CVE-2022-0135) - CVE-2022-0135 virglrenderer: out-of-bounds write in read_transfer_data()
Summary: CVE-2022-0135 virglrenderer: out-of-bounds write in read_transfer_data()
Keywords:
Status: NEW
Alias: CVE-2022-0135
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: 2048607 2048606 2048612 2048613
Blocks: 2037791 2037795
TreeView+ depends on / blocked
 
Reported: 2022-01-06 15:24 UTC by Michael Kaplan
Modified: 2023-09-11 19:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
An out-of-bounds write issue was found in the VirGL virtual OpenGL renderer (virglrenderer). This flaw allows a malicious guest to create a specially crafted virgil resource and then issue a VIRTGPU_EXECBUFFER ioctl, leading to a denial of service or possible code execution.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Michael Kaplan 2022-01-06 15:24:29 UTC
An out-of-bound write was found in virglrenderer in src/vrend_renderer.c:read_transfer_data().

Comment 2 Mauro Matteo Cascella 2022-01-31 15:35:22 UTC
Created virglrenderer tracking bugs for this issue:

Affects: epel-8 [bug 2048607]
Affects: fedora-all [bug 2048606]

Comment 5 Mauro Matteo Cascella 2022-01-31 17:35:34 UTC
The flaw arises from the fact that both vrend_renderer_transfer_write_iov() and read_transfer_data() calculate `send_size` to allocate a buffer and transfer data to it, respectively. However, they calculate the size in a slightly different way: vrend_renderer_transfer_write_iov() does not take `box->depth` into account. Under certain circumstances, this could lead to the allocation of a smaller heap buffer which is later accessed out-of-bounds by read_transfer_data.


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