CVE details
CVE-2018-16872
A flaw was found in qemu 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.
Affected ports (2)
| Port | Package | Version | Status | Maintainer |
|---|---|---|---|---|
| emulators/qemu-cheri | qemu-cheri | 0.d20260108 | unaddressed | brooks@FreeBSD.org |
| emulators/qemu-user-static | qemu-user-static | 3.1.0_16 | unaddressed | emulation@FreeBSD.org |
Template for a VuXML entry
Range taken from the CVE record, check it before committing. make newentry in security/vuxml creates the vid.
<vuln vid="FIXME (make newentry)">
<topic>FIXME -- FIXME</topic>
<affects>
<package>
<name>qemu-cheri</name>
<range><lt>FIXME</lt></range>
</package>
<package>
<name>qemu-user-static</name>
<range><lt>FIXME</lt></range>
</package>
</affects>
<description>
<body xmlns="http://www.w3.org/1999/xhtml">
<p>A flaw was found in qemu 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.</p>
</body>
</description>
<references>
<cvename>CVE-2018-16872</cvename>
<url>https://nvd.nist.gov/vuln/detail/CVE-2018-16872</url>
</references>
<dates>
<discovery>2018-12-13</discovery>
<entry>2026-10-25</entry>
</dates>
</vuln>