|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] qemu-traditional/passthrough: fix off-by-one in PCI config space register index check
Register 255 (0xff) is still valid to be accessed.
Reported-by: Rolu <rolu@xxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -1538,7 +1538,7 @@ static void pt_pci_write_config(PCIDevic
#endif
/* check offset range */
- if (address >= 0xFF)
+ if (address > 0xFF)
{
PT_LOG_DEV(d, "Error: Failed to write register with offset exceeding
FFh. "
"[Offset:%02xh][Length:%d]\n", address, len);
@@ -1714,7 +1714,7 @@ static uint32_t pt_pci_read_config(PCIDe
int ret = 0;
/* check offset range */
- if (address >= 0xFF)
+ if (address > 0xFF)
{
PT_LOG_DEV(d, "Error: Failed to read register with offset exceeding
FFh. "
"[Offset:%02xh][Length:%d]\n", address, len);
Attachment:
qemu-PCI-config-space-range.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |