pcie_sriov: Validate NumVFs
commit6081b4243cd64dff1b2cf5b0c215c71e9d7e753b
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Wed, 28 Feb 2024 11:33:13 +0000 (28 20:33 +0900)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 12 Mar 2024 21:56:55 +0000 (12 17:56 -0400)
tree103c03b0aa606b0c8d97e4b7b34ca1b60c3a0be1
parent91bb64a8d2014fda33a81fcf0fce37340f0d3b0c
pcie_sriov: Validate NumVFs

The guest may write NumVFs greater than TotalVFs and that can lead
to buffer overflow in VF implementations.

Cc: qemu-stable@nongnu.org
Fixes: CVE-2024-26327
Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization (SR/IOV)")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240228-reuse-v8-2-282660281e60@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@ericsson.com>
hw/pci/pcie_sriov.c