Bug 1654885 (CVE-2018-16867)

Summary: CVE-2018-16867 QEMU: dev-mtp: path traversal in usb_mtp_write_data of the Media Transfer Protocol (MTP)
Product: [Other] Security Response Reporter: Laura Pardo <lpardo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: ailan, amit, areis, berrange, cfergeau, dbecker, drjones, dwmw2, imammedo, itamar, jen, jforbes, jjoyce, jschluet, kbasil, knoel, lhh, lpeer, m.a.young, mburns, mkenneth, mrezanin, mst, pbonzini, ppandit, public, rbalakri, rjones, rkrcmar, robinlee.sysu, sclewis, security-response-team, slinaber, virt-maint, virt-maint, vkuznets, xen-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: qemu 3.1.0 Doc Type: Bug Fix
Doc Text:
A flaw was found in QEMU's Media Transfer Protocol (MTP) where a path traversal in the in usb_mtp_write_data function in hw/usb/dev-mtp.c due to an improper file name sanitization. Reading and writing of arbitrary files is allowed when a guest device is mounted which may lead to a denial of service scenario or possibly lead to code execution on the host.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-10 10:43:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1656746    
Bug Blocks: 1654890    

Description Laura Pardo 2018-11-29 23:13:08 UTC
A flaw was found in qemu Media Transfer Protocol (MTP). A path traversal in the in usb_mtp_write_data function in hw/usb/dev-mtp.c due to an improper filename sanitization. When the guest device is mounted in read-write mode, this allows to read/write arbitrary files which may lead do DoS scenario OR possibly lead to code execution on the host.

Upstream patch:
---------------
  -> https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg00390.html

Reference:
----------
  -> https://www.openwall.com/lists/oss-security/2018/12/06/1

Comment 1 Laura Pardo 2018-11-29 23:13:17 UTC
Acknowledgments:

Name: Michael Hanselmann (hansmi.ch)

Comment 2 Prasad Pandit 2018-12-06 09:01:57 UTC
Created qemu tracking bugs for this issue:

Affects: fedora-all [bug 1656746]

Comment 3 Sam Fowler 2018-12-12 02:20:28 UTC
External Reference:

https://www.openwall.com/lists/oss-security/2018/12/06/1