mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
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> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
a791dc0e35
commit
ad0ea7c444
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user