Integer overflow in QEMU - CVE-2018-12617

 

Integer overflow in QEMU - CVE-2018-12617

Published: July 30, 2018 / Updated: June 17, 2021


Vulnerability identifier: #VU14116
CSH Severity: Low
CVSS v4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2018-12617
CWE-ID: CWE-190
Exploitation vector: Remote access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a remote attacker to cause DoS condition on the target system.

The vulnerability exists due to integer overflow in qmp_guest_file_read in qga/commands-posix.c and qga/commands-win32.c in qemu-ga (aka QEMU Guest Agent). A remote attacker can send a specially crafted QMP command (including guest-file-read with a large count value) to the agent via the listening socket, cause a g_malloc0() call to trigger a segmentation fault when trying to allocate a large memory chunk and cause the service to crash.


Affected software

QEMU
Ubuntu
Opensuse
Fedora
qemu-system-x86 (Ubuntu package)
qemu-system-arm (Ubuntu package)
qemu-system (Ubuntu package)
qemu-system-mips (Ubuntu package)
qemu-system-sparc (Ubuntu package)
qemu-system-misc (Ubuntu package)
qemu-system-ppc (Ubuntu package)
qemu-system-aarch64 (Ubuntu package)
qemu-system-s390x (Ubuntu package)
qemu

How to mitigate CVE-2018-12617

Install update from vendor's website.

qemu-system-x86 (Ubuntu package) - addressed in versions 2.0.0+dfsg-2ubuntu1.44, 1:2.5+dfsg-5ubuntu10.33, 1:2.11+dfsg-1ubuntu7.8, 1:2.12+dfsg-3ubuntu8.1
qemu-system-arm (Ubuntu package) - addressed in versions 2.0.0+dfsg-2ubuntu1.44, 1:2.5+dfsg-5ubuntu10.33, 1:2.11+dfsg-1ubuntu7.8, 1:2.12+dfsg-3ubuntu8.1
qemu-system (Ubuntu package) - addressed in versions 2.0.0+dfsg-2ubuntu1.44, 1:2.5+dfsg-5ubuntu10.33, 1:2.11+dfsg-1ubuntu7.8, 1:2.12+dfsg-3ubuntu8.1
qemu-system-mips (Ubuntu package) - addressed in versions 2.0.0+dfsg-2ubuntu1.44, 1:2.5+dfsg-5ubuntu10.33, 1:2.11+dfsg-1ubuntu7.8, 1:2.12+dfsg-3ubuntu8.1
qemu-system-sparc (Ubuntu package) - addressed in versions 2.0.0+dfsg-2ubuntu1.44, 1:2.5+dfsg-5ubuntu10.33, 1:2.11+dfsg-1ubuntu7.8, 1:2.12+dfsg-3ubuntu8.1
qemu-system-misc (Ubuntu package) - addressed in versions 2.0.0+dfsg-2ubuntu1.44, 1:2.5+dfsg-5ubuntu10.33, 1:2.11+dfsg-1ubuntu7.8, 1:2.12+dfsg-3ubuntu8.1
qemu-system-ppc (Ubuntu package) - addressed in versions 2.0.0+dfsg-2ubuntu1.44, 1:2.5+dfsg-5ubuntu10.33, 1:2.11+dfsg-1ubuntu7.8, 1:2.12+dfsg-3ubuntu8.1
qemu-system-aarch64 (Ubuntu package) - addressed in versions 2.0.0+dfsg-2ubuntu1.44, 1:2.5+dfsg-5ubuntu10.33
qemu-system-s390x (Ubuntu package) - addressed in versions 1:2.5+dfsg-5ubuntu10.33, 1:2.11+dfsg-1ubuntu7.8, 1:2.12+dfsg-3ubuntu8.1
qemu - addressed in versions 2.10.2-1.fc27, 2.11.2-2.fc28

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins