Skip to content
Commit fdcbe7d5 authored by Asias He's avatar Asias He Committed by Michael Roth
Browse files

scsi: Allocate SCSITargetReq r->buf dynamically

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1007330
Brew: https://brewweb.devel.redhat.com/taskinfo?taskID=6282465



This is the backport of the following commit. The patch is not
sent public since it is a embargoed bug.

   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: default avatarAsias He <asias@redhat.com>

Signed-off-by: default avatarAsias He <asias@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>

*s/&r->buf/r->buf/ due to type change

Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
parent 1b5f7709
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment