Files
poky/meta/recipes-devtools
Hongxu Jia 309ef190da debugedit: fix segment fault while file's bss offset have a large number
While ELF_C_RDWR_MMAP was used, elf_begin invoked mmap() to map file
into memory. While the file's bss Offset has a large number, elf_update
caculated file size by __elf64_updatenull_wrlock and the size was
enlarged.

In this situation, elf_update invoked ftruncate to enlarge the file,
and memory size (elf->maximum_size) also was incorrectly updated.
There was segment fault in elf_end which invoked munmap with the
length is the enlarged file size, not the mmap's length.

Before the above operations, invoke elf_begin/elf_update/elf_end
with ELF_C_RDWR and ELF_F_LAYOUT set to enlarge the above file, it
could make sure the file is safe for the following elf operations.

[YOCTO #5356]
https://bugzilla.redhat.com/show_bug.cgi?id=1019707
https://bugzilla.redhat.com/show_bug.cgi?id=1020842

(From OE-Core master rev: 35c8b1ac7c3b1e4209b1e30d1dbd1a457286b97b)

(From OE-Core rev: a82322a982dc97ebc95f3fc45f9ad98bed947ad9)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 17:00:05 +00:00
..
2013-07-02 22:23:49 +01:00
2013-09-17 20:53:20 +01:00
2013-09-14 08:21:01 +01:00
2013-06-07 16:48:23 +01:00
2013-10-01 22:56:03 +01:00
2013-10-14 16:55:22 +01:00
2013-08-03 10:33:05 +01:00
2013-08-26 11:29:45 +01:00
2013-07-05 15:44:12 +01:00
2013-02-06 09:37:26 +00:00
2011-11-29 11:22:04 +00:00
2013-07-29 13:09:02 +01:00
2013-08-03 10:33:05 +01:00
2013-07-29 13:09:09 +01:00
2013-04-28 12:12:20 +01:00
2013-03-18 13:18:24 +00:00
2013-07-29 13:09:14 +01:00
2013-10-07 09:37:33 +01:00
2012-08-19 10:46:39 +01:00
2013-08-13 23:05:58 +01:00