qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] vfio/pci: Fix buffer overrun when writing the VF token
@ 2023-10-26  7:06 Cédric Le Goater
  2023-10-26  7:06 ` [PATCH v2 1/3] util/uuid: Add UUID_STR_LEN definition Cédric Le Goater
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Cédric Le Goater @ 2023-10-26  7:06 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. 

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(-)

-- 
2.41.0



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

end of thread, other threads:[~2023-10-30  9:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-26  7:06 [PATCH v2 0/3] vfio/pci: Fix buffer overrun when writing the VF token Cédric Le Goater
2023-10-26  7:06 ` [PATCH v2 1/3] util/uuid: Add UUID_STR_LEN definition Cédric Le Goater
2023-10-26  7:06 ` [PATCH v2 2/3] vfio/pci: Fix buffer overrun when writing the VF token Cédric Le Goater
2023-10-26 11:28   ` Peter Maydell
2023-10-26 13:33     ` Cédric Le Goater
2023-10-26  7:06 ` [PATCH v2 3/3] util/uuid: Remove UUID_FMT_LEN Cédric Le Goater
2023-10-26  7:18   ` Philippe Mathieu-Daudé
2023-10-26 10:57   ` Juan Quintela
2023-10-26  8:41 ` [PATCH v2 0/3] vfio/pci: Fix buffer overrun when writing the VF token Denis V. Lunev
2023-10-26  9:58   ` Cédric Le Goater
2023-10-26 13:42   ` Konstantin Ryabitsev
2023-10-26 15:36     ` Peter Maydell
2023-10-26 14:00 ` Cédric Le Goater
2023-10-27  5:01   ` Philippe Mathieu-Daudé
2023-10-30  8:59   ` Cédric Le Goater

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).