Commit 0695a961 authored by Colin Watson's avatar Colin Watson

grub-core/loader/efi/fdt.c: do not copy random memory

parents ed3246fc 2a8298a2
# see git-dpm(1) from git-dpm package
614ea0626131fc49f82d80e6459a200b8bc8e591
614ea0626131fc49f82d80e6459a200b8bc8e591
2a8298a27e1313af552c049e35ec8c8c82197285
2a8298a27e1313af552c049e35ec8c8c82197285
59aeb1cfaa3d5bfd7bbeeee0f0d37f6d9eed51fe
59aeb1cfaa3d5bfd7bbeeee0f0d37f6d9eed51fe
grub2_2.02+dfsg1.orig.tar.xz
......
grub2 (2.02+dfsg1-10) UNRELEASED; urgency=medium
* Apply patch from Heinrich Schuchardt (mentioned in #916695 though
unrelated):
- grub-core/loader/efi/fdt.c: do not copy random memory
-- Colin Watson <cjwatson@debian.org> Fri, 21 Dec 2018 21:20:48 +0000
grub2 (2.02+dfsg1-9) unstable; urgency=medium
[ Colin Watson ]
......
From 2a8298a27e1313af552c049e35ec8c8c82197285 Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Mon, 17 Dec 2018 22:00:24 +0100
Subject: grub-core/loader/efi/fdt.c: do not copy random memory
We should not try to copy any memory area which is outside of the original
fdt. If this extra memory is controlled by a hypervisor this might end
with a crash.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Origin: other, https://lists.gnu.org/archive/html/grub-devel/2018-12/msg00042.html
Last-Update: 2018-12-21
Patch-Name: efi-fdt-do-not-copy-random-memory.patch
---
grub-core/loader/efi/fdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c
index a4c6e8036..c9aee74ef 100644
--- a/grub-core/loader/efi/fdt.c
+++ b/grub-core/loader/efi/fdt.c
@@ -66,7 +66,7 @@ grub_fdt_load (grub_size_t additional_size)
if (raw_fdt)
{
- grub_memmove (fdt, raw_fdt, size);
+ grub_memmove (fdt, raw_fdt, size - additional_size);
grub_fdt_set_totalsize (fdt, size);
}
else
......@@ -99,3 +99,4 @@ efi-fdt-set-address-size-cells-to-2-for-empty-tree.patch
linuxefi-update-to-new-interfaces.patch
gcc-8-packed-not-aligned.patch
linuxefi-skip-validation-without-secure-boot.patch
efi-fdt-do-not-copy-random-memory.patch
......@@ -66,7 +66,7 @@ grub_fdt_load (grub_size_t additional_size)
if (raw_fdt)
{
grub_memmove (fdt, raw_fdt, size);
grub_memmove (fdt, raw_fdt, size - additional_size);
grub_fdt_set_totalsize (fdt, size);
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment