grub/grub-core
Andrei Borzenkov ebb3d958aa fix memory corruption in pubkey filter over network
grub_pubkey_open closed original file after it was read; it set
io->device to NULL to prevent grub_file_close from trying to close device.
But network device itself is stacked (net -> bufio); and bufio preserved
original netfs file which hold reference to device. grub_file_close(io)
called grub_bufio_close which called grub_file_close for original file.
grub_file_close(netfs-file) now also called grub_device_close which
freed file->device->net. So file structure returned by grub_pubkey_open
now had device->net pointed to freed memory. When later file was closed,
it was attempted to be freed again.

Change grub_pubkey_open to behave like other filters - preserve original
parent file and pass grub_file_close down to parent. In this way only the
original file will close device. We really need to move this logic into
core instead.

Also plug memory leaks in error paths on the way.

Reported-By: Robert Kliewer <robert.kliewer@gmail.com>
Closes: bug #43601
2014-12-05 21:17:08 +03:00
..
boot * grub-core/boot/sparc64/ieee1275/boot.S: Fix order of fields. 2013-12-19 01:53:56 +01:00
bus cleanup: grub_cpu_to_XXX_compile_time for constants 2014-09-22 20:47:10 +04:00
commands fix memory corruption in pubkey filter over network 2014-12-05 21:17:08 +03:00
disk grub-core/disk/geli.c: fix memory leaks in error paths 2014-11-28 22:23:30 +03:00
efiemu fix include loop on MinGW due to libintl.h pulling stdio.h 2014-01-18 21:22:57 +04:00
font Pass font config to config.h and not by TARGET_CFLAGS as adding 2013-12-04 10:25:53 +01:00
fs grub-core/fs/zfs/zfsinfo.c: memory leak in print_vdev_info 2014-12-01 20:54:12 +03:00
gdb With Apple assembly in .macro environvemnt you have to use $$ instead 2013-11-24 07:08:18 +01:00
gettext * grub-core/gettext/gettext.c (main_context), (secondary_context): 2013-11-07 01:01:47 +01:00
gfxmenu Enable -Wformat=2 if it's supported. 2013-12-21 15:28:28 +01:00
gnulib Allow compilation with mingw64 albeit with warnings due to lack of 2013-10-15 18:03:19 +02:00
hello * grub-core/commands/gptsync.c: Fix typographic quoting. 2012-03-03 13:05:08 +01:00
hook * grub-core/hook/datehook.c (grub_read_hook_datetime): Small stylistic 2011-11-11 21:03:49 +01:00
io grub-core/disk/lzopio.c: fix double free in error path 2014-11-28 22:37:00 +03:00
kern efi: check *path non-null before grub_strrchr 2014-11-17 14:11:01 +00:00
lib grub-core/lib/syslinux_parse.c: do not free array 2014-11-30 18:49:14 +03:00
loader grub-core/loader/i386/xen_fileXX.c: memory leak in grub_xen_get_infoXX 2014-12-01 21:23:54 +03:00
mmap * grub-core/mmap/i386/uppermem.c (lower_hook) [COREBOOT]: Ignore low 2014-02-28 09:50:47 +01:00
net send router solicitation for ipv6 address autoconf v2 2014-11-28 20:21:34 +03:00
normal * grub-core/normal/main.c: Don't drop to rescue console in 2014-09-21 18:51:09 +02:00
osdep * grub-core/osdep/unix/config.c: Remove extraneous comma. 2014-09-21 17:49:13 +02:00
partmap cleanup: grub_cpu_to_XXX_compile_time for constants 2014-09-22 20:47:10 +04:00
parttool * grub-core/net/http.c: Add TRANSLATORS comments. 2012-03-05 16:42:26 +01:00
script Decrease stack usage in lexer. 2013-11-16 16:37:59 +01:00
term * grub-core/term/at_keyboard.c: Retry probing keyboard if 2014-08-13 23:04:01 +02:00
tests cleanup: grub_cpu_to_XXX_compile_time for constants 2014-09-22 20:47:10 +04:00
video fix include loop on MinGW due to libintl.h pulling stdio.h 2014-01-18 21:22:57 +04:00
gdb_grub.in * grub-core/gdb_grub.in: Fix overflow and wrong field. 2013-10-14 03:40:20 +02:00
genemuinit.sh use MODULE_FILES for genemuinit* instead of MOD_FILES 2014-01-18 23:15:40 +04:00
genemuinitheader.sh use MODULE_FILES for genemuinit* instead of MOD_FILES 2014-01-18 23:15:40 +04:00
genmod.sh.in * grub-core/genmod.sh.in: Strip before converting to ELF as strip 2013-12-16 13:18:48 +01:00
genmoddep.awk * grub-core/genmoddep.awk: Remove explicit getline < /dev/stdin. 2013-12-16 13:02:19 +01:00
gensyminfo.sh.in * grub-core/gensyminfo.sh.in: Handle the case of portable output 2013-11-11 23:05:53 +01:00
gensymlist.sh Make 'make check' work on emu. 2013-04-27 02:00:16 +02:00
gentrigtables.c * grub-core/gentrigtables.c: Make tables const. 2013-03-01 11:15:09 +01:00
gmodule.pl.in * grub-core/gmodule.pl.in: Accept newer binutils which output 2014-09-21 18:23:23 +02:00
gnulib-fix-null-deref.diff Import new gnulib. 2013-04-11 21:12:46 +02:00
gnulib-fix-width.diff Import new gnulib. 2013-04-11 21:12:46 +02:00
gnulib-no-abort.diff Import new gnulib. 2013-04-11 21:12:46 +02:00
gnulib-no-gets.diff Import new gnulib. 2013-04-11 21:12:46 +02:00
Makefile.am use MODULE_FILES for genemuinit* instead of MOD_FILES 2014-01-18 23:15:40 +04:00
Makefile.core.def strip .eh_frame section from arm64-efi kernel 2013-12-30 13:07:54 +00:00
modinfo.sh.in Save TARGET_CC version in modinfo.sh. 2013-12-24 14:47:44 +01:00