Fix CVE-2017-5667 (sdhci OOB access during multi block SDMA transfer): http://seclists.org/oss-sec/2017/q1/243 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5667 Patch copied from upstream source repository: http://git.qemu-project.org/?p=qemu.git;a=commitdiff;h=42922105beb14c2fc58185ea022b9f72fb5465e9 From 42922105beb14c2fc58185ea022b9f72fb5465e9 Mon Sep 17 00:00:00 2001 From: Prasad J Pandit Date: Tue, 7 Feb 2017 18:29:59 +0000 Subject: [PATCH] sd: sdhci: check data length during dma_memory_read While doing multi block SDMA transfer in routine 'sdhci_sdma_transfer_multi_blocks', the 's->fifo_buffer' starting index 'begin' and data length 's->data_count' could end up to be same. This could lead to an OOB access issue. Correct transfer data length to avoid it. Cc: qemu-stable@nongnu.org Reported-by: Jiang Xin Signed-off-by: Prasad J Pandit Reviewed-by: Peter Maydell Message-id: 20170130064736.9236-1-ppandit@redhat.com Signed-off-by: Peter Maydell --- hw/sd/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 01fbf228be..5bd5ab6319 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -536,7 +536,7 @@ static void sdhci_sdma_transfer_multi_blocks(SDHCIState *s) boundary_count -= block_size - begin; } dma_memory_read(&address_space_memory, s->sdmasysad, - &s->fifo_buffer[begin], s->data_count); + &s->fifo_buffer[begin], s->data_count - begin); s->sdmasysad += s->data_count - begin; if (s->data_count == block_size) { for (n = 0; n < block_size; n++) { -- 2.11.1 >
AgeCommit message (Expand)Author
2022-06-04nls: Update translations....po/packages/tr.po: New file. po/packages/LINGUAS: Add it. Julien Lepiller
2022-04-02nls: Update translations....* po/packages/fi.po: New file. * po/packages/LINGUAS: Add it. Julien Lepiller
2021-09-02nls: Update translations....* po/packages/it.po: New file. * po/packages/LINGUAS: Add `it'. * po/*/*.po: Update translations. Julien Lepiller
2021-05-10nls: New nl and oc translations for the 'packages' component....* po/packages/nl.po: New file. * po/packages/oc.po: Likewise. * po/packages/LINGUAS: Register them. Maxim Cournoyer
2021-04-18nls: Remove 'vi' in LINGUAS...The po file is no longer available. * po/packages/LINGUAS: Remove 'vi'. Julien Lepiller
2021-04-18nls: Add Korean translation....* po/doc/guix-cookbook.ko.po: New file. * po/doc/guix-manual.ko.po: New file. * doc/local.mk (info_TEXINFOS): Add them. * po/doc/local.mk (DOC_PO_FILES, DOC_COOKBOOK_PO_FILES): Add them. * po/guix/ko.po: New file. * po/guix/LINGUAS: Add 'ko'. * po/packages/ko.po: New file. * po/packages/LINGUAS: Add 'ko'. Julien Lepiller
2021-04-18nls: Add Persian translation....* po/packages/fa.po: New file. * po/packages/LINGUAS: Add 'fa'. * po/doc/guix-cookbook.fa.po: New file. * po/doc/guix-manual.fa.po: New file. * po/doc/local.mk (DOC_PO_FILES, DOC_COOKBOOK_PO_FILES): Add them. * doc/local.mk (info_TEXINFOS): Add them. Julien Lepiller
2021-04-18nls: Add Slovak translation....* po/packages/sk.po: New file. * po/packages/LINGUAS: Add 'sk'. * po/doc/guix-manual.sk.po: New file. * doc/local.mk (info_TEXINFOS): Add it. * po/doc/local.mk (DOC_PO_FILES): Add it. Julien Lepiller