grub/grub-core/loader
Peter Jones 631a820038 Initialized initrd_ctx so we don't free a random pointer from the stack.
Currently, if "linux" fails, the "goto fail;" in grub_cmd_initrd sends us
into grub_initrd_close() without grub_initrd_init() being called, and thus
it never clears initrd_ctx->components.  grub_initrd_close() then frees that
address, which is stale data from the stack.  If the stack happens to have a
stale *address* there that matches a recent allocation, then you'll get a
double free later.

So initialize the memory up front.

Signed-off-by: Peter Jones <pjones@redhat.com>
2014-09-21 10:36:42 +04:00
..
arm Initialized initrd_ctx so we don't free a random pointer from the stack. 2014-09-21 10:36:42 +04:00
arm64 Initialized initrd_ctx so we don't free a random pointer from the stack. 2014-09-21 10:36:42 +04:00
efi Declare GRUB_EFI_VENDOR_APPLE_GUID. 2013-12-24 14:14:19 +01:00
i386 Initialized initrd_ctx so we don't free a random pointer from the stack. 2014-09-21 10:36:42 +04:00
ia64/efi Initialized initrd_ctx so we don't free a random pointer from the stack. 2014-09-21 10:36:42 +04:00
mips Initialized initrd_ctx so we don't free a random pointer from the stack. 2014-09-21 10:36:42 +04:00
powerpc/ieee1275 Initialized initrd_ctx so we don't free a random pointer from the stack. 2014-09-21 10:36:42 +04:00
sparc64/ieee1275 Initialized initrd_ctx so we don't free a random pointer from the stack. 2014-09-21 10:36:42 +04:00
aout.c Implement automatic module license checking according to new GNU 2011-04-11 23:01:51 +02:00
linux.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
lzss.c Add LZSS Mach-O support (needed for new xnu kernelcache). 2012-02-29 13:26:13 +01:00
macho.c Add missing license section in macbless.mod and macho.mod. 2013-12-18 17:11:11 +01:00
macho32.c * grub-core/loader/machoXX.c: Fix compilation on non-i386. 2013-12-17 22:44:46 +01:00
macho64.c * grub-core/loader/machoXX.c: Fix compilation on non-i386. 2013-12-17 22:44:46 +01:00
machoXX.c Simplify few strings. 2013-05-07 11:44:15 +02:00
multiboot.c Implement multiboot2 EFI BS specification. 2013-12-13 12:56:14 +01:00
multiboot_elfxx.c * grub-core/loader/multiboot.c: Add support for multiboot kernels 2013-10-28 15:23:46 +01:00
multiboot_mbi2.c * grub-core/loader/multiboot_mbi2.c: Implement special value for load_addr. 2013-12-17 15:14:50 +01:00
xnu.c * grub-core/kern/env.c, include/grub/env.h: Change iterator through 2013-03-03 01:34:27 +01:00
xnu_resume.c * grub-core/loader/xnu_resume.c (grub_xnu_resume): Reject empty images. 2013-10-28 14:25:22 +01:00