mbox series

[0/2] hw/scsi/scsi-disk: Avoid buffer overrun parsing loadparam (CID 1565746)

Message ID 20241120085300.49866-1-philmd@linaro.org
Headers show
Series hw/scsi/scsi-disk: Avoid buffer overrun parsing loadparam (CID 1565746) | expand

Message

Philippe Mathieu-Daudé Nov. 20, 2024, 8:52 a.m. UTC
Replace magic 8 by proper LOADPARM_LEN definition,
use array of char, allocate loadparam[] within qdev
state, fixing Coverity overrun report (CID 1565746).

Philippe Mathieu-Daudé (2):
  hw/s390x: Declare loadparm as char[LOADPARM_LEN]
  hw/scsi/scsi-disk: Avoid buffer overrun parsing 'loadparam'

 hw/s390x/ccw-device.h               |  5 +++--
 hw/s390x/ipl.h                      |  2 +-
 include/hw/qdev-properties-system.h |  2 +-
 include/hw/s390x/s390-virtio-ccw.h  |  3 ++-
 hw/core/qdev-properties-system.c    |  8 +++++---
 hw/s390x/ipl.c                      |  6 +++---
 hw/scsi/scsi-disk.c                 | 12 +++---------
 7 files changed, 18 insertions(+), 20 deletions(-)