CVE-2018-16872

Related Vulnerabilities: CVE-2018-16872  

A flaw was found in QEMU's Media Transfer Protocol (MTP). The code opening files in usb_mtp_get_object and usb_mtp_get_partial_object and directories in usb_mtp_object_readdir doesn't consider that the underlying filesystem may have changed since the time lstat(2) was called in usb_mtp_object_alloc, a classical TOCTTOU problem. An attacker with write access to the host filesystem, shared with a guest, can use this property to navigate the host filesystem in the context of the QEMU process and read any file the QEMU process has access to. Access to the filesystem may be local or via a network share protocol such as CIFS.

A flaw was found in QEMU's Media Transfer Protocol (MTP). The code opening files in usb_mtp_get_object and usb_mtp_get_partial_object and directories in usb_mtp_object_readdir doesn't consider that the underlying filesystem may have changed since the time lstat(2) was called in usb_mtp_object_alloc, a classical TOCTTOU problem. An attacker with write access to the host filesystem, shared with a guest, can use this property to navigate the host filesystem in the context of the QEMU process and read any file the QEMU process has access to. Access to the filesystem may be local or via a network share protocol such as CIFS.

Find out more about CVE-2018-16872 from the MITRE CVE dictionary dictionary and NIST NVD.

CVSS v3 metrics

NOTE: The following CVSS v3 metrics and score provided are preliminary and subject to review.

CVSS3 Base Score 5
CVSS3 Base Metrics CVSS:3.0/AV:L/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:L
Attack Vector Local
Attack Complexity High
Privileges Required High
User Interaction None
Scope Changed
Confidentiality Low
Integrity Impact Low
Availability Impact Low

Affected Packages State

Platform Package State
Red Hat OpenStack Platform 9.0 qemu-kvm-rhev Not affected
Red Hat OpenStack Platform 8.0 (Liberty) qemu-kvm-rhev Not affected
Red Hat OpenStack Platform 14 qemu-kvm-rhev Not affected
Red Hat OpenStack Platform 13.0 (Queens) qemu-kvm-rhev Not affected
Red Hat OpenStack Platform 12.0 qemu-kvm-rhev Not affected
Red Hat OpenStack Platform 10 qemu-kvm-rhev Not affected
Red Hat Enterprise Linux 7 qemu-kvm Not affected
Red Hat Enterprise Linux 7 qemu-kvm-rhev Not affected
Red Hat Enterprise Linux 7 qemu-kvm-ma Not affected
Red Hat Enterprise Linux 6 qemu-kvm Not affected
Red Hat Enterprise Linux 5 kvm Not affected
Red Hat Enterprise Linux 5 xen Not affected

Acknowledgements

Red Hat would like to thank Michael Hanselmann (hansmi.ch) for reporting this issue.