]> git.ipfire.org Git - thirdparty/qemu.git/commit
usb-mtp: outlaw slashes in filenames
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 3 Dec 2018 10:10:45 +0000 (11:10 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 2 Apr 2019 01:36:21 +0000 (20:36 -0500)
commit61f87388af0af72ad61dee00ddd267b8047049f2
tree70beead30e181fb63a3ef350b2365bc16d6574b0
parentd086829e5ba00d75637cd6ab51c4f291f62db941
usb-mtp: outlaw slashes in filenames

Slash is unix directory separator, so they are not allowed in filenames.
Note this also stops the classic escape via "../".

Fixes: CVE-2018-16867
Reported-by: Michael Hanselmann <public@hansmi.ch>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20181203101045.27976-3-kraxel@redhat.com
(cherry picked from commit c52d46e041b42bb1ee6f692e00a0abe37a9659f6)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/usb/dev-mtp.c