f036a54ad6
Refine the reproducible build changes to no longer override linux commands, but rather fix via patches only. Also fix all the recent security issues reported. OBS-URL: https://build.opensuse.org/request/show/441247 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=320
41 lines
1.6 KiB
Diff
41 lines
1.6 KiB
Diff
From 3e3bf236d5b712cd5861effaf193093779584c80 Mon Sep 17 00:00:00 2001
|
|
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
Date: Mon, 29 Aug 2016 11:35:37 +0200
|
|
Subject: [PATCH] scsi: mptconfig: fix misuse of MPTSAS_CONFIG_PACK
|
|
|
|
These issues cause respectively a QEMU crash and a leak of 2 bytes of
|
|
stack. They were discovered by VictorV of 360 Marvel Team.
|
|
|
|
Reported-by: Tom Victor <i-tangtianwen@360.cm>
|
|
Cc: qemu-stable@nongnu.org
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
(cherry picked from commit 65a8e1f6413a0f6f79894da710b5d6d43361d27d)
|
|
[BR: CVE-2016-7157 BSC#997860]
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
|
---
|
|
hw/scsi/mptconfig.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/hw/scsi/mptconfig.c b/hw/scsi/mptconfig.c
|
|
index 3e4f400..87a416a 100644
|
|
--- a/hw/scsi/mptconfig.c
|
|
+++ b/hw/scsi/mptconfig.c
|
|
@@ -203,7 +203,7 @@ size_t mptsas_config_manufacturing_1(MPTSASState *s, uint8_t **data, int address
|
|
{
|
|
/* VPD - all zeros */
|
|
return MPTSAS_CONFIG_PACK(1, MPI_CONFIG_PAGETYPE_MANUFACTURING, 0x00,
|
|
- "s256");
|
|
+ "*s256");
|
|
}
|
|
|
|
static
|
|
@@ -328,7 +328,7 @@ size_t mptsas_config_ioc_0(MPTSASState *s, uint8_t **data, int address)
|
|
return MPTSAS_CONFIG_PACK(0, MPI_CONFIG_PAGETYPE_IOC, 0x01,
|
|
"*l*lwwb*b*b*blww",
|
|
pcic->vendor_id, pcic->device_id, pcic->revision,
|
|
- pcic->subsystem_vendor_id,
|
|
+ pcic->class_id, pcic->subsystem_vendor_id,
|
|
pcic->subsystem_id);
|
|
}
|
|
|