Skip to content
Commit 84642435 authored by Asias He's avatar Asias He Committed by Paolo Bonzini
Browse files

scsi: Allocate SCSITargetReq r->buf dynamically [CVE-2013-4344]



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>
Tested-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 24c7608a
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