CVE-2019-18389
📋 TL;DR
A heap-based buffer overflow in virglrenderer's vrend_renderer_transfer_write_iov function allows guest OS users to cause denial of service or potentially achieve QEMU guest-to-host escape and code execution. This affects virtualization environments using virglrenderer through version 0.8.0 for 3D acceleration in virtual machines.
💻 Affected Systems
- virglrenderer
- QEMU with virglrenderer integration
- Virtualization platforms using virglrenderer
📦 What is this software?
Leap by Opensuse
Virglrenderer by Virglrenderer Project
⚠️ Risk & Real-World Impact
Worst Case
Full guest-to-host escape leading to arbitrary code execution on the hypervisor/host system, potentially compromising all VMs and host resources.
Likely Case
Denial of service causing VM crashes or instability, with potential for limited guest-to-host escape in targeted attacks.
If Mitigated
Isolated VM crash without host compromise if proper virtualization isolation controls are effective.
🎯 Exploit Status
Exploitation requires guest VM access and knowledge of the virglrenderer protocol. The vulnerability is in the VIRGL_CCMD_RESOURCE_INLINE_WRITE command handling.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: virglrenderer 0.8.1 and later
Vendor Advisory: https://access.redhat.com/security/cve/cve-2019-18389
Restart Required: Yes
Instructions:
1. Update virglrenderer to version 0.8.1 or later. 2. Update QEMU if using bundled virglrenderer. 3. Restart affected virtual machines. 4. Verify the fix by checking virglrenderer version.
🔧 Temporary Workarounds
Disable virglrenderer 3D acceleration
linuxDisable 3D acceleration using virglrenderer in QEMU/KVM virtual machine configurations
Edit VM configuration to remove or disable virglrenderer acceleration (e.g., remove '-device virtio-vga,virgl=on' or similar options)
🧯 If You Can't Patch
- Isolate vulnerable VMs on separate hosts or networks to limit potential host compromise impact
- Implement strict access controls to guest VMs and monitor for unusual activity
🔍 How to Verify
Check if Vulnerable:
Check virglrenderer version: 'virglrenderer --version' or check package version with 'rpm -q virglrenderer' or 'dpkg -l virglrenderer'
Check Version:
virglrenderer --version 2>/dev/null || rpm -q virglrenderer 2>/dev/null || dpkg -l virglrenderer 2>/dev/null | grep ^ii
Verify Fix Applied:
Verify virglrenderer version is 0.8.1 or later and check that the commit cbc8d8b75be360236cada63784046688aeb6d921 is included
📡 Detection & Monitoring
Log Indicators:
- QEMU/VMM crash logs
- Kernel oops or panic messages related to virglrenderer
- Guest VM abnormal termination with virglrenderer errors
Network Indicators:
- Unusual virglrenderer protocol traffic patterns from guest VMs
SIEM Query:
source="qemu.log" AND ("virglrenderer" OR "VIRGL_CCMD_RESOURCE_INLINE_WRITE") AND ("crash" OR "overflow" OR "panic")
🔗 References
- http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00028.html
- https://access.redhat.com/security/cve/cve-2019-18389
- https://bugzilla.redhat.com/show_bug.cgi?id=1765577
- https://gitlab.freedesktop.org/virgl/virglrenderer/commit/cbc8d8b75be360236cada63784046688aeb6d921
- https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests/314/diffs?commit_id=9c280a28651507e6ef87b17b90d47b6af3a4ab7d
- https://lists.debian.org/debian-lts-announce/2022/12/msg00017.html
- http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00028.html
- https://access.redhat.com/security/cve/cve-2019-18389
- https://bugzilla.redhat.com/show_bug.cgi?id=1765577
- https://gitlab.freedesktop.org/virgl/virglrenderer/commit/cbc8d8b75be360236cada63784046688aeb6d921
- https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests/314/diffs?commit_id=9c280a28651507e6ef87b17b90d47b6af3a4ab7d
- https://lists.debian.org/debian-lts-announce/2022/12/msg00017.html