Integer overflow in QEMU - CVE-2018-12617
Published: July 30, 2018 / Updated: June 17, 2021
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
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
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