Files
linux/fs
Denys Vlasenko 7c36d46d08 coredump: prevent double-free on an error path in core dumper
commit f34f9d186d upstream.

In !CORE_DUMP_USE_REGSET case, if elf_note_info_init fails to allocate
memory for info->fields, it frees already allocated stuff and returns
error to its caller, fill_note_info.  Which in turn returns error to its
caller, elf_core_dump.  Which jumps to cleanup label and calls
free_note_info, which will happily try to free all info->fields again.
BOOM.

This is the fix.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-07 08:27:25 -07:00
..
2011-07-17 23:20:29 -04:00
2012-09-14 10:00:50 -07:00
2011-11-11 09:35:59 -08:00
2011-06-20 17:53:24 -05:00
2012-04-27 09:51:18 -07:00
2011-07-17 23:21:35 -04:00
2011-07-06 12:15:16 -07:00
2012-09-14 10:00:37 -07:00
2012-04-27 09:51:09 -07:00
2011-05-26 10:01:43 -06:00