diff options
author | Leo Famulari <leo@famulari.name> | 2017-06-04 14:56:31 -0400 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2017-06-04 14:56:31 -0400 |
commit | 9f825cec1beb0174a218ee3af603a692e5aea81d (patch) | |
tree | 16dd2359f73965bb015a89daa76af4ca1ba2e500 /gnu/packages/patches/qemu-CVE-2017-8380.patch | |
parent | 8b4186e116434860a93fd1c8163fdeb86c1d63a8 (diff) | |
parent | cc24bf98bd9b57e7f5653858c1a54283a490cbd0 (diff) | |
download | guix-9f825cec1beb0174a218ee3af603a692e5aea81d.tar guix-9f825cec1beb0174a218ee3af603a692e5aea81d.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/qemu-CVE-2017-8380.patch')
-rw-r--r-- | gnu/packages/patches/qemu-CVE-2017-8380.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/patches/qemu-CVE-2017-8380.patch b/gnu/packages/patches/qemu-CVE-2017-8380.patch new file mode 100644 index 0000000000..65e49fc885 --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2017-8380.patch @@ -0,0 +1,53 @@ +Fix CVE-2017-8380: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8380 + +Patch copied from upstream source repository: + +http://git.qemu.org/?p=qemu.git;a=commitdiff;h=24dfa9fa2f90a95ac33c7372de4f4f2c8a2c141f + +From 24dfa9fa2f90a95ac33c7372de4f4f2c8a2c141f Mon Sep 17 00:00:00 2001 +From: Prasad J Pandit <pjp@fedoraproject.org> +Date: Mon, 24 Apr 2017 17:36:34 +0530 +Subject: [PATCH] scsi: avoid an off-by-one error in megasas_mmio_write + +While reading magic sequence(MFI_SEQ) in megasas_mmio_write, +an off-by-one error could occur as 's->adp_reset' index is not +reset after reading the last sequence. + +Reported-by: YY Z <bigbird475958471@gmail.com> +Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> +Message-Id: <20170424120634.12268-1-ppandit@redhat.com> +Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> +--- + hw/scsi/megasas.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c +index 84b8caf901..804122ab05 100644 +--- a/hw/scsi/megasas.c ++++ b/hw/scsi/megasas.c +@@ -2138,15 +2138,15 @@ static void megasas_mmio_write(void *opaque, hwaddr addr, + case MFI_SEQ: + trace_megasas_mmio_writel("MFI_SEQ", val); + /* Magic sequence to start ADP reset */ +- if (adp_reset_seq[s->adp_reset] == val) { +- s->adp_reset++; ++ if (adp_reset_seq[s->adp_reset++] == val) { ++ if (s->adp_reset == 6) { ++ s->adp_reset = 0; ++ s->diag = MFI_DIAG_WRITE_ENABLE; ++ } + } else { + s->adp_reset = 0; + s->diag = 0; + } +- if (s->adp_reset == 6) { +- s->diag = MFI_DIAG_WRITE_ENABLE; +- } + break; + case MFI_DIAG: + trace_megasas_mmio_writel("MFI_DIAG", val); +-- +2.13.0 + |