]> git.ipfire.org Git - thirdparty/qemu.git/commit
uas: add stream number sanity checks.
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 18 Aug 2021 12:05:05 +0000 (14:05 +0200)
committerMichael Roth <michael.roth@amd.com>
Mon, 18 Oct 2021 01:18:25 +0000 (20:18 -0500)
commit36403e8788a264dc96174f52584681ebcb4f54b1
tree9befc7e7465dbcb946b1d5e35f45ab8c2c4c03f3
parent5a964fe8d93efd9c42c72a6244bd23039380eb59
uas: add stream number sanity checks.

The device uses the guest-supplied stream number unchecked, which can
lead to guest-triggered out-of-band access to the UASDevice->data3 and
UASDevice->status3 fields.  Add the missing checks.

Fixes: CVE-2021-3713
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reported-by: Chen Zhe <chenzhe@huawei.com>
Reported-by: Tan Jingguo <tanjingguo@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210818120505.1258262-2-kraxel@redhat.com>
(cherry picked from commit 13b250b12ad3c59114a6a17d59caf073ce45b33a)
Signed-off-by: Michael Roth <michael.roth@amd.com>
hw/usb/dev-uas.c