]> code.ossystems Code Review - openembedded-core.git/commit
elfutils: check data_list.data.d.d_buf before free it
authorRobert Yang <liezhi.yang@windriver.com>
Thu, 16 Aug 2018 02:38:22 +0000 (10:38 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 16 Aug 2018 09:44:07 +0000 (10:44 +0100)
commit560154e8525dce4beb8199ffc0d7c964da9d665a
treea55511d6bca23c7c63511ec62ef9b623f7be1aeb
parentb7c291ee6532cba845ee6bfbbaa21076a2b2cbe5
elfutils: check data_list.data.d.d_buf before free it

[YOCTO #12791]

The one which actually saves the data is data_list.data.d.d_buf, so check it
before free rawdata_base.

This can fix a segmentation fault when prelink libqb_1.0.3:
prelink: /usr/lib/libqb.so.0.18.2: Symbol section index outside of section numbers

The segmentation fault happens when prelink call elf_end().

Fixed:
MACHINE="qemux86-64"
IMAGE_INSTALL_append = " libqb" #libqp is from meta-openembedded
$ bitbake core-image-minimal
Segmention fault

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
meta/recipes-devtools/elfutils/elfutils_0.172.bb
meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch [new file with mode: 0644]