Re: [Qemu-devel] [PATCH] usb-mtp: Limit filename to object information size

2018-12-13 Thread Gerd Hoffmann
On Thu, Dec 13, 2018 at 10:37:06PM +, Michael Hanselmann wrote: > The filename length in MTP metadata is specified by the guest. By > trusting it directly it'd theoretically be possible to get the host to > write memory parts outside the filename buffer into a filename. In > practice though the

[Qemu-devel] [PATCH] usb-mtp: Limit filename to object information size

2018-12-13 Thread Michael Hanselmann
The filename length in MTP metadata is specified by the guest. By trusting it directly it'd theoretically be possible to get the host to write memory parts outside the filename buffer into a filename. In practice though there are usually NUL bytes stopping the string operations. Also use the oppor