vfio/pci: reject invalid PCI_INTERRUPT_PIN values
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 5 repliesIn review
- v11 patch 1 replySuperseded
Changes in v2 from the cover letter
* original submission was wrongly ported patch from downstream. Fixed
* added checks for narrowed values
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | vfio/pci: don't narrow a failed config read to a plausible valuehw/ | +25 | 2 replies | |
| 2/2 | vfio/pci: reject invalid PCI_INTERRUPT_PIN valueshw/ | +5 | 3 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Cédric Le Goater | Philippe Mathieu-Daudé |
|---|---|---|
| 1/2 | R-b | |
| 2/2 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/2] vfio/pci: reject invalid PCI_INTERRUPT_PIN values
qemu-kvm aborts a few seconds after starting a VM with a passed-through GPU whose PCI_INTERRUPT_PIN comes back as an out-of-range value: vfio_intx_enable() only guards against pin == 0 and stores vdev->intx.pin = pin - 1 with no upper-bound check. That value reaches pci_irq_handler()'sassert(0 <= irq_num && irq_num < PCI_NUM_PINS) via pci_irq_deassert() -> pci_set_irq(), aborting the whole process instead of just failing the device.
v1 -> v2:
* original submission was wrongly ported patch from downstream. Fixed
* added checks for narrowed values
Denis V. Lunev (2):
vfio/pci: don't narrow a failed config read to a plausible value vfio/pci: reject invalid PCI_INTERRUPT_PIN values
hw/vfio/pci.c | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-)
Signature · 1 line
2.53.0