On 9/6/26 4:53 AM, Marc-André Lureau wrote:
s390_build_iplb() initially points lp at the eight-byte CCW loadparm
array. For SCSI devices, it can replace lp with a variable-length string
returned by object_property_get_str().

The following memcmp() still reads eight bytes. ASan reports
buffer-overflow on value "3", when running test_scsi_loadparm
func-s390x-boot_4k test.

Check the fixed-size CCW loadparm for the 8-zero before the SCSI
property can replace lp.

Fixes: 429442e52d94 ("hw: Add "loadparm" property to scsi disk devices for booting 
on s390x")
Signed-off-by: Marc-André Lureau <[email protected]>
---
  hw/s390x/ipl.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Eric Farman <[email protected]>

Reply via email to