CVE-2016-7156: pvscsi: infinite loop when building SG list (bz #1373480) CVE-2016-7156: pvscsi: infinite loop when processing IO requests (bz #1373480) CVE-2016-7170: vmware_vga: OOB stack memory access (bz #1374709) CVE-2016-7157: mptsas: invalid memory access (bz #1373505) CVE-2016-7466: usb: xhci memory leakage during device unplug (bz #1377838) CVE-2016-7423: scsi: mptsas: OOB access (bz #1376777) CVE-2016-7422: virtio: null pointer dereference (bz #1376756) CVE-2016-7908: net: Infinite loop in mcf_fec_do_tx (bz #1381193) CVE-2016-8576: usb: xHCI: infinite loop vulnerability (bz #1382322) CVE-2016-7995: usb: hcd-ehci: memory leak (bz #1382669)
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From: Li Qiang <liqiang6-s@360.cn>
|
|
Date: Mon, 12 Sep 2016 18:14:11 +0530
|
|
Subject: [PATCH] scsi: mptsas: use g_new0 to allocate MPTSASRequest object
|
|
|
|
When processing IO request in mptsas, it uses g_new to allocate
|
|
a 'req' object. If an error occurs before 'req->sreq' is
|
|
allocated, It could lead to an OOB write in mptsas_free_request
|
|
function. Use g_new0 to avoid it.
|
|
|
|
Reported-by: Li Qiang <liqiang6-s@360.cn>
|
|
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
|
|
Message-Id: <1473684251-17476-1-git-send-email-ppandit@redhat.com>
|
|
Cc: qemu-stable@nongnu.org
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
(cherry picked from commit 670e56d3ed2918b3861d9216f2c0540d9e9ae0d5)
|
|
---
|
|
hw/scsi/mptsas.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
|
|
index 0e0a22f..eaae1bb 100644
|
|
--- a/hw/scsi/mptsas.c
|
|
+++ b/hw/scsi/mptsas.c
|
|
@@ -304,7 +304,7 @@ static int mptsas_process_scsi_io_request(MPTSASState *s,
|
|
goto bad;
|
|
}
|
|
|
|
- req = g_new(MPTSASRequest, 1);
|
|
+ req = g_new0(MPTSASRequest, 1);
|
|
QTAILQ_INSERT_TAIL(&s->pending, req, next);
|
|
req->scsi_io = *scsi_io;
|
|
req->dev = s;
|