[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/2] vfio/pci: Fix buffer overrun when writing the VF token
|
From: |
Cédric Le Goater |
|
Subject: |
[PATCH 0/2] vfio/pci: Fix buffer overrun when writing the VF token |
|
Date: |
Wed, 25 Oct 2023 12:12:43 +0200 |
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
- [PATCH 0/2] vfio/pci: Fix buffer overrun when writing the VF token,
Cédric Le Goater <=