Skip to content

vfio/pci: Fix buffer overrun when writing the VF token

Cédric Le Goater qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 11 repliesIn review
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- removal of UUID_FMT_LEN

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3util/uuid: Add UUID_STR_LEN definitionblock/parallels-ext.c block/vdi.c hw/core/qdev-properties-system.c +5 more+10 -90 replies
2/3vfio/pci: Fix buffer overrun when writing the VF tokenhw/vfio/pci.c+1 -12 replies
3/3util/uuid: Remove UUID_FMT_LENinclude/qemu/uuid.h+1 -22 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-DaudéJuan QuintelaAlex WilliamsonDenis V. Lunev
SeriesReviwed-by
1/3R-b R-b
2/3R-b R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/3] vfio/pci: Fix buffer overrun when writing the VF token

Hello,

This series fixes a buffer overrun in VFIO. The buffer used in vfio_realize() by qemu_uuid_unparse() is too small, UUID_FMT_LEN lacks one byte for the trailing NUL.

Instead of adding + 1, as done elsewhere, the changes introduce a UUID_STR_LEN define for the correct size and use it where required.

Thanks,

C.

Changes in v2:
- removal of UUID_FMT_LEN

Cédric Le Goater (3):
util/uuid: Add UUID_STR_LEN definition vfio/pci: Fix buffer overrun when writing the VF token util/uuid: Remove UUID_FMT_LEN

 include/qemu/uuid.h              | 2 +-
 block/parallels-ext.c            | 2 +-
 block/vdi.c                      | 2 +-
 hw/core/qdev-properties-system.c | 2 +-
 hw/hyperv/vmbus.c                | 4 ++--
 hw/vfio/pci.c                    | 2 +-
 migration/savevm.c               | 4 ++--
 tests/unit/test-uuid.c           | 2 +-
 util/uuid.c                      | 2 +-
 9 files changed, 11 insertions(+), 11 deletions(-)
Signature · 1 line
2.41.0