render / rpms / qemu

Forked from rpms/qemu 10 months ago
Clone

Blame 0015-scsi-megasas-initialise-local-configuration-data-buf.patch

cf91b1
From: Prasad J Pandit <pjp@fedoraproject.org>
cf91b1
Date: Wed, 25 May 2016 17:41:44 +0530
cf91b1
Subject: [PATCH] scsi: megasas: initialise local configuration data buffer
cf91b1
cf91b1
When reading MegaRAID SAS controller configuration via MegaRAID
cf91b1
Firmware Interface(MFI) commands, routine megasas_dcmd_cfg_read
cf91b1
uses an uninitialised local data buffer. Initialise this buffer
cf91b1
to avoid stack information leakage.
cf91b1
cf91b1
Reported-by: Li Qiang <liqiang6-s@360.cn>
cf91b1
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
cf91b1
Message-Id: <1464178304-12831-1-git-send-email-ppandit@redhat.com>
cf91b1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
cf91b1
(cherry picked from commit d37af740730dbbb93960cd318e040372d04d6dcf)
cf91b1
---
cf91b1
 hw/scsi/megasas.c | 2 +-
cf91b1
 1 file changed, 1 insertion(+), 1 deletion(-)
cf91b1
cf91b1
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
cf91b1
index dcbd3e1..bf642d4 100644
cf91b1
--- a/hw/scsi/megasas.c
cf91b1
+++ b/hw/scsi/megasas.c
cf91b1
@@ -1293,7 +1293,7 @@ static int megasas_dcmd_ld_get_info(MegasasState *s, MegasasCmd *cmd)
cf91b1
 
cf91b1
 static int megasas_dcmd_cfg_read(MegasasState *s, MegasasCmd *cmd)
cf91b1
 {
cf91b1
-    uint8_t data[4096];
cf91b1
+    uint8_t data[4096] = { 0 };
cf91b1
     struct mfi_config_data *info;
cf91b1
     int num_pd_disks = 0, array_offset, ld_offset;
cf91b1
     BusChild *kid;