1. CVE archive
  2. 2021
  3. CVE-2021-3545

CVE-2021-3545

6.5 Medium severity CVSS v3.1 · source NVD CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N 6.5 – Medium

Description

An information disclosure vulnerability was found in the virtio vhost-user GPU device (vhost-user-gpu) of QEMU in versions up to and including 6.0. The flaw exists in virgl_cmd_get_capset_info() in contrib/vhost-user-gpu/virgl.c and could occur due to the read of uninitialized memory. A malicious guest could exploit this issue to leak memory from the host.

Affected products

VendorProductVersionPlatform
debian debian linux 11.0 –
qemu qemu <= 6.0.0 –
All 419 Qemu vulnerabilities

Vulnerability type

CWE-908 Use of Uninitialized Resource

The product uses or accesses a resource that has not been initialized.

Impact on systems

ScopeImpact
Confidentiality Read Memory, Read Application Data
When reusing a resource such as memory or a program variable, the original contents may not have been cleared before it is sent to an untrusted party.
Availability DoS: Crash, Exit, or Restart, DoS: Instability
The uninitialized resource may contain values that cause program flow to change in ways that the programmer did not intend, possibly leading to a crash.
Other Unexpected State, Varies by Context
The consequences vary depending on the type of resource and how it is used within the product.

How to prevent it

Implementation Explicitly initialize the resource before use. If this is performed through an API function or standard procedure, follow all required steps.
Implementation Pay close attention to complex conditionals that affect initialization, since some branches might not perform the initialization.
Implementation Avoid race conditions (CWE-362) during initialization routines.
Build and Compilation Run or compile the product with settings that generate warnings about uninitialized variables or data.

All 1,027 CWE-908 CVEs, with trend and prevention

Source: MITRE CWE catalog · cwe.mitre.org