[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/3] scsi: megasas: initialise local configuration d

From: P J P
Subject: [Qemu-devel] [PATCH 2/3] scsi: megasas: initialise local configuration data buffer
Date: Wed, 25 May 2016 16:01:30 +0530

From: Prasad J Pandit <address@hidden>

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 <address@hidden>
Signed-off-by: Prasad J Pandit <address@hidden>
 hw/scsi/megasas.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index dcbd3e1..7c08932 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -1305,6 +1305,7 @@ static int megasas_dcmd_cfg_read(MegasasState *s, 
MegasasCmd *cmd)
     QTAILQ_FOREACH(kid, &s->bus.qbus.children, sibling) {
+    memset(data, 0, sizeof(data));
     info = (struct mfi_config_data *)&data;
      * Array mapping:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]