usb/redir: avoid dynamic stack allocation (CVE-2021-3527)
commit7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 3 May 2021 13:29:12 +0000 (3 15:29 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 4 May 2021 06:38:34 +0000 (4 08:38 +0200)
tree802cba8cb772bfb78d805b6e0a46640f8eff882d
parent3f67e2e7f135b8be4117f3c2960e78d894feaa03
usb/redir: avoid dynamic stack allocation (CVE-2021-3527)

Use autofree heap allocation instead.

Fixes: 4f4321c11ff ("usb: use iovecs in USBPacket")
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210503132915.2335822-3-kraxel@redhat.com>
hw/usb/redirect.c