Re: Is PIE randomization breaking klibc binaries?

Jiri Kosina
2007-07-31T11:19:01Z

On Wed, 25 Jul 2007, Ulrich Kunitz wrote:

> The message looks like:
> sleep[7888]: segfault at 000000000004001C rip 000000000004001C rsp
> 00007fff14776468 error 14
> Repeated calls get the same message with the stack pointer changing.
> Other binaries (mount) have a segmentation fault at another addressi
> (0x400184). It appears that the instruction pointer fails at the start
> address of the klibc binary. Notify that this lies in the binary itself
> and not in the /lib/klibc*.so object, so it appears that the klibc
> binary sections are loaded at randomized addresses.

Hi Ulrich,

I just now quickly tried to with klibc-1.5 on i386 with the
PIE-randomization patched kernel, and it seems to load static libraries
fine.

I just downloaded klibc-1.5, built it, and executed a few of the programs
in usr/utils/static, all of them worked. Does this also work for you and
you are experiencing the problems solely when the binaries are being run
from initramfs during boot?

I will test more shortly (on x86_64, directly from initramfs) in order to
reproduce.

Thanks,

--
Jiri Kosina
SUSE Labs