[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/35] scsi: initialise info object with appropriate
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 08/35] scsi: initialise info object with appropriate size |
Date: |
Mon, 21 Mar 2016 12:28:06 -0500 |
From: P J P <address@hidden>
While processing controller 'CTRL_GET_INFO' command, the routine
'megasas_ctrl_get_info' overflows the '&info' object size. Use its
appropriate size to null initialise it.
Reported-by: Qinghao Tang <address@hidden>
Signed-off-by: Prasad J Pandit <address@hidden>
Message-Id: <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: P J P <address@hidden>
(cherry picked from commit 36fef36b91f7ec0435215860f1458b5342ce2811)
Signed-off-by: Michael Roth <address@hidden>
---
hw/scsi/megasas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index d7dc667..576f56c 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -718,7 +718,7 @@ static int megasas_ctrl_get_info(MegasasState *s,
MegasasCmd *cmd)
BusChild *kid;
int num_pd_disks = 0;
- memset(&info, 0x0, cmd->iov_size);
+ memset(&info, 0x0, dcmd_size);
if (cmd->iov_size < dcmd_size) {
trace_megasas_dcmd_invalid_xfer_len(cmd->index, cmd->iov_size,
dcmd_size);
--
1.9.1
- [Qemu-devel] [PATCH 22/35] fw_cfg: avoid calculating invalid current entry pointer, (continued)
- [Qemu-devel] [PATCH 22/35] fw_cfg: avoid calculating invalid current entry pointer, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 34/35] quorum: Fix crash in quorum_aio_cb(), Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 33/35] target-arm: Make reserved ranges in ID_AA64* spaces RAZ, not UNDEF, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 28/35] spapr: skip configuration section during migration of older machines, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 02/35] net: vmxnet3: avoid memory leakage in activate_device, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 04/35] configure: Fix shell syntax to placate OpenBSD's pdksh, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 05/35] xen/blkif: Avoid double access to src->nr_segments, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 06/35] xenfb: avoid reading twice the same fields from the shared page, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 08/35] scsi: initialise info object with appropriate size,
Michael Roth <=
- [Qemu-devel] [PATCH 07/35] virtio-9p: use accessor to get thread_pool, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 35/35] vl.c: Fix regression in machine error message, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 03/35] target-ppc: kvm: fix floating point registers sync on little-endian hosts, Michael Roth, 2016/03/21
- Re: [Qemu-devel] [Qemu-stable] [PATCH 00/35] Patch Round-up for stable 2.5.1, freeze on 2016-03-25, Cole Robinson, 2016/03/21
- Re: [Qemu-devel] [Qemu-stable] [PATCH 00/35] Patch Round-up for stable 2.5.1, freeze on 2016-03-25, Peter Lieven, 2016/03/22