Re: [Qemu-devel] [PATCH v2] scsi: Allocate SCSITargetReq r->buf dynamically

2013-10-09 Thread Paolo Bonzini
Il 09/10/2013 09:41, Asias He ha scritto: > r->buf is hardcoded to 2056 which is (256 + 1) * 8, allowing 256 luns at > most. If more than 256 luns are specified by user, we have buffer > overflow in scsi_target_emulate_report_luns. > > To fix, we allocate the buffer dynamically. > > Signed-off-by

[Qemu-devel] [PATCH v2] scsi: Allocate SCSITargetReq r->buf dynamically

2013-10-09 Thread Asias He
r->buf is hardcoded to 2056 which is (256 + 1) * 8, allowing 256 luns at most. If more than 256 luns are specified by user, we have buffer overflow in scsi_target_emulate_report_luns. To fix, we allocate the buffer dynamically. Signed-off-by: Asias He Tested-by: Michael Roth --- Changes in v2: