qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] vfio/pci: Fix buffer overrun when writing the VF token
@ 2023-10-25 10:12 Cédric Le Goater
  2023-10-25 10:12 ` [PATCH 1/2] util/uuid: Add UUID_STR_LEN definition Cédric Le Goater
  2023-10-25 10:12 ` [PATCH 2/2] vfio/pci: Fix buffer overrun when writing the VF token Cédric Le Goater
  0 siblings, 2 replies; 7+ messages in thread
From: Cédric Le Goater @ 2023-10-25 10:12 UTC (permalink / raw)
  To: qemu-devel
  Cc: Stefan Hajnoczi, Denis V . Lunev, Kevin Wolf, Hanna Reitz,
	Stefan Weil, Paolo Bonzini, Daniel P . Berrangé,
	Eduardo Habkost, Maciej S . Szmigiero, Fam Zheng, Juan Quintela,
	Peter Xu, Fabiano Rosas, Leonardo Bras, Cédric Le Goater

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. 

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

 include/qemu/uuid.h              | 1 +
 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(+), 10 deletions(-)

-- 
2.41.0



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-10-25 19:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-25 10:12 [PATCH 0/2] vfio/pci: Fix buffer overrun when writing the VF token Cédric Le Goater
2023-10-25 10:12 ` [PATCH 1/2] util/uuid: Add UUID_STR_LEN definition Cédric Le Goater
2023-10-25 10:27   ` Juan Quintela
2023-10-25 12:13   ` Philippe Mathieu-Daudé
2023-10-25 10:12 ` [PATCH 2/2] vfio/pci: Fix buffer overrun when writing the VF token Cédric Le Goater
2023-10-25 10:28   ` Juan Quintela
2023-10-25 19:55   ` Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).