Bug 1906388 - QEMU: division by zero in zynq_slcr_compute_pll() in hw/misc/zynq_slcr.c
Summary: QEMU: division by zero in zynq_slcr_compute_pll() in hw/misc/zynq_slcr.c
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1906514 1906513
Blocks: 1903276
TreeView+ depends on / blocked
 
Reported: 2020-12-10 12:09 UTC by Mauro Matteo Cascella
Modified: 2021-02-16 18:45 UTC (History)
34 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-10 12:47:07 UTC
Embargoed:


Attachments (Terms of Use)

Description Mauro Matteo Cascella 2020-12-10 12:09:23 UTC
A divide by zero issue was found in the Xilinx Zynq platform emulation of QEMU, available through arm/aarch64 targets. Specifically, function zynq_slcr_compute_pll() in hw/misc/zynq_slcr.c computes the output frequency using input frequency and PLL_CTRL register without properly validating the latter. A guest user may be able to exploit this flaw to crash the QEMU process on the host, resulting in a denial of service.

Comment 1 Mauro Matteo Cascella 2020-12-10 12:09:42 UTC
Acknowledgments:

Name: Gaoning Pan (Zhejiang University)

Comment 2 Mauro Matteo Cascella 2020-12-10 17:07:10 UTC
Created qemu tracking bugs for this issue:

Affects: epel-7 [bug 1906514]
Affects: fedora-all [bug 1906513]

Comment 4 Mauro Matteo Cascella 2020-12-11 14:02:21 UTC
Statement:

This issue does not affect the versions of `qemu-kvm` as shipped with Red Hat products, as they do not include support for the Xilinx Zynq platform emulation. Additionally, Red Hat Product Security does not consider this bug to be a security vulnerability because it only affects the non-virtualization use case. For further information, please refer to the QEMU Security page: https://www.qemu.org/docs/master/system/security.html.

Comment 5 Philippe Mathieu-Daudé 2020-12-15 22:30:18 UTC
FWIW, upstream fix:
https://git.qemu.org/?p=qemu.git;a=commit;h=98a8cc741dad9cb4738f81a994bcf8d77d619152


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