All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Ulrich Kunitz <kune@deine-taler.de>
Cc: linux-kernel@vger.kernel.org, honza@jikos.cz, jkosina@suse.cz
Subject: Re: Is PIE randomization breaking klibc binaries?
Date: Fri, 20 Jul 2007 15:05:51 -0700	[thread overview]
Message-ID: <46A131BF.4080404@zytor.com> (raw)
In-Reply-To: <20070720211300.GA21644@deine-taler.de>

Ulrich Kunitz wrote:
> Since this week new linux-2.6/master kernels don't work with my
> initial ram disks. The sleep binary runs repeatingly into
> segmentation faults until the Busybox shell starts. My system is a
> x86-64 with Kubuntu Feisty Fawn.
> 
> By bisecting I found out that the PIE randomization patch (commit 60bfba7e)
> appears to cause the segmentation faults.
> 
> Digging further into the issue I found out, that the sleep binary
> on the initial ramdisk is a klibc binary. /usr/bin/file says it is
> statically linked and uses shared libraries. I have no clue about
> klibc, but the binaries seem to be statically linked, but load a
> shared library; probably at a fixed address. Other klibc binaries are also
> running into segmentation faults. Busybox is working, but it is
> statically linked and doesn't use a shared library.
> 
> It looks like that the PIE randomization patch breaks klibc
> binaries on x86-64.
> 

Interesting.

klibc binaries are indeed statically linked, but composed of two
different ELF images: the application itself and the shared libary
(which is referenced from the application header as the "interpreter").
 Neither of these is an ET_DYN file; they are both ET_EXEC, so it
*should* be unaffected by the PIE randomization patch.  Obviously, that
seems to not be the case.

My guess is that this patch mishandles interpreter images which are
ET_EXEC.  Jan, any insight?

	-hpa

  reply	other threads:[~2007-07-20 22:06 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-20 21:13 Is PIE randomization breaking klibc binaries? Ulrich Kunitz
2007-07-20 22:05 ` H. Peter Anvin [this message]
2007-07-24 20:34   ` Chuck Ebbert
2007-07-24 20:57     ` Chuck Ebbert
2007-07-24 22:00       ` Ulrich Kunitz
2007-07-24 22:41         ` Chuck Ebbert
2007-07-24 22:45           ` H. Peter Anvin
2007-07-24 23:13             ` Ulrich Kunitz
2007-07-25  6:32             ` Ulrich Kunitz
2007-07-31 11:30               ` Jiri Kosina
2007-07-31 12:01                 ` H. Peter Anvin
2007-07-31 12:19                   ` Jiri Kosina
2007-07-31 12:15                     ` H. Peter Anvin
2007-08-01 14:07                       ` Jiri Kosina
2007-08-02  4:29                         ` Ulrich Kunitz
2007-08-02 11:21                           ` Jiri Kosina
2007-08-02 17:03                             ` Bret Towe
2007-08-02 19:02               ` Sergey Vlasov
2007-08-02 19:10                 ` H. Peter Anvin
2007-08-02 20:42                   ` Ulrich Kunitz
2007-08-02 21:03                   ` Jiri Kosina
2007-08-02 19:10                 ` Ulrich Kunitz
2007-07-21  6:02 ` Bret Towe
2007-07-21 10:18   ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46A131BF.4080404@zytor.com \
    --to=hpa@zytor.com \
    --cc=honza@jikos.cz \
    --cc=jkosina@suse.cz \
    --cc=kune@deine-taler.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.