summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorPrasad J Pandit2016-05-25 14:11:44 +0200
committerPaolo Bonzini2016-05-29 09:11:10 +0200
commitd37af740730dbbb93960cd318e040372d04d6dcf (patch)
tree7c7c40c182be7afae41407bd8af94e02dec211ba /hw
parentscsi: megasas: use appropriate property buffer size (diff)
downloadqemu-d37af740730dbbb93960cd318e040372d04d6dcf.tar.gz
qemu-d37af740730dbbb93960cd318e040372d04d6dcf.tar.xz
qemu-d37af740730dbbb93960cd318e040372d04d6dcf.zip
scsi: megasas: initialise local configuration data buffer
When reading MegaRAID SAS controller configuration via MegaRAID Firmware Interface(MFI) commands, routine megasas_dcmd_cfg_read uses an uninitialised local data buffer. Initialise this buffer to avoid stack information leakage. Reported-by: Li Qiang <liqiang6-s@360.cn> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-Id: <1464178304-12831-1-git-send-email-ppandit@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/scsi/megasas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index dcbd3e1f24..bf642d4ff3 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -1293,7 +1293,7 @@ static int megasas_dcmd_ld_get_info(MegasasState *s, MegasasCmd *cmd)
static int megasas_dcmd_cfg_read(MegasasState *s, MegasasCmd *cmd)
{
- uint8_t data[4096];
+ uint8_t data[4096] = { 0 };
struct mfi_config_data *info;
int num_pd_disks = 0, array_offset, ld_offset;
BusChild *kid;