public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesse Pollard <jesse@cats-chateau.net>
To: Pavel Machek <pavel@suse.cz>, Aaron Lehmann <aaronl@vitelus.com>
Cc: Jesper Juhl <juhl-lkml@dif.dk>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, Eric Youngdale <eric@andante.org>,
	Eric Youngdale <ericy@cais.com>
Subject: Re: [PATCH] stronger ELF sanity checks v2
Date: Fri, 16 Jan 2004 13:55:23 -0600	[thread overview]
Message-ID: <04011613552300.04912@tabby> (raw)
In-Reply-To: <20040116160841.GA302@elf.ucw.cz>

On Friday 16 January 2004 10:08, Pavel Machek wrote:
> Hi!
>
> > On Tue, Jan 13, 2004 at 02:55:07AM +0100, Jesper Juhl wrote:
> > > Here's the second version of my patch to add better sanity checks for
> > > binfmt_elf
> >
> > I assume this breaks Brian Raiter's tiny ELF executables[1]. Even
> > though these binaries are evil hacks that don't comply to standards
> > and serve no serious purpose, I'm not sure what the purpose of the
> > sanity checks is. Are there any risks associated with running
> > non-compliant ELF executables? (Now that I mention it, the
>
> You get vy ugly behaviour. If you compile executable with huge static
> data, it will compile okay, link okay, *launch okay* and die on
> segfault. That's wrong, it should have died on -ENOMEM during exec.
> 								Pave

Wouldn't that depend on the overcommit options?

With permitted overcommit -
	compile/link ok
	launch - segfault/-ENOMEM if heap/stack + static data UPDATES exceed
		 system capacity
Without overcommit:
	-ENOMEM if the heap/stack can't be initialized; as in even the
		first page of the heap/stack fails - and before actual
		launch completes, as the situation you describe.

If static data is just referenced, it should page in, and get dropped.

  reply	other threads:[~2004-01-16 19:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-13  1:55 [PATCH] stronger ELF sanity checks v2 Jesper Juhl
2004-01-13  3:32 ` Aaron Lehmann
2004-01-13 10:39   ` Eric W. Biederman
2004-01-16 16:08   ` Pavel Machek
2004-01-16 19:55     ` Jesse Pollard [this message]
2004-01-16 21:36       ` Pavel Machek
2004-01-13 17:35 ` Jakub Jelinek
2004-01-13 19:54   ` Jesper Juhl
2004-01-15  7:43     ` Ulrich Drepper
     [not found] <1dmam-2Xk-11@gated-at.bofh.it>
     [not found] ` <1dAQW-109-3@gated-at.bofh.it>
     [not found]   ` <1dCSg-5vk-55@gated-at.bofh.it>
     [not found]     ` <1eaqw-6Dk-29@gated-at.bofh.it>
2004-01-15 13:13       ` Pascal Schmidt

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=04011613552300.04912@tabby \
    --to=jesse@cats-chateau.net \
    --cc=aaronl@vitelus.com \
    --cc=akpm@osdl.org \
    --cc=eric@andante.org \
    --cc=ericy@cais.com \
    --cc=juhl-lkml@dif.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox