mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Jamie Lokier <jamie@shareable.org>
Cc: Ulrich Drepper <drepper@redhat.com>,
	john stultz <johnstul@us.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH] linux-2.6.2-rc2_vsyscall-gtod_B1.patch
Date: Tue, 3 Feb 2004 17:25:15 +0100	[thread overview]
Message-ID: <20040203162515.GY26076@dualathlon.random> (raw)
In-Reply-To: <20040203085224.GA15738@mail.shareable.org>

On Tue, Feb 03, 2004 at 08:52:24AM +0000, Jamie Lokier wrote:
> Ulrich Drepper wrote:
> > You got to be kidding.  Some object fixed in the address space which can
> > perform system calls.  Nothing is more welcome to somebody trying to
> > exploit some bugs.
> 
> Two approaches to randomising the vdso address:
> 
>   1. Selecting a random address at boot time.  All tasks have the same
>      vdso for that run of the kernel.  Advantages: no MSR write at
>      each context switch; could patch libsyscall.so at boot time with
>      address if we were fanatical about optimisation (i.e. other
>      libcs, not Glibc :)  Disadvantages: the attacker may eventually
>      learn the address.
> 
>   2. Select a random address for every new task.  Advantages: harder
>      to guess from studying a machine for a long time.  Disadvantages:
>      slower context switches; the gain from randomising each task is
>      nothing if all the tasks are very long lived anyway.

could you please explain what's the point of this randomising thing what
this attacker is trying to do?

nothing can be randomized, as far as the vsyscall can be executed it
means its address in the address space is known and not random. If the
address is random you can't execute it. The whole vsyscall space is
readonly, the attacker can do nothing on it, no way to touch it with
put_user either.

on x86-64 whatever is executable is readable too (readable non
executable is possible but that's another issue)

whatever the API you'll always be able to find the vsyscall address or
it means you can't execute it in the first place.

so in short, either we have vsyscalls non-randomized, or we don't have
them at all, period.

especially having a fixed address per-kernel makes no sense at all since
it's trivial to find out by all other tasks anyways.

the current API was presented around two years ago at UKUUG, and it was
developed in the open in the x86-64 mailing list (archives should be
online), so if there's really a fundamental problem it would been much
better if you would send your complains to those lists at that time,
instead of coming out of the blue years later when the code runs in
production just fine for years (and it's in glibc for a long time too I
think).

Still I'm struggling to understand what's your point about
randomization, your request makes no sense at all to me and I cannot
imagine any remote security issue related to the current API of the
vsyscalls, furthmore I cannot remotely imagine any difference in terms
of security by using a vsyscall table, the only difference to the end
user would be that its userspace would be running slower, while right
now it's running as fast as the hardware can.

I would appreciate a more detailed explanation rather than "address must
randomized and the api must be changed".

  reply	other threads:[~2004-02-03 16:26 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-29  2:46 john stultz
2004-01-29  5:06 ` Ulrich Drepper
2004-01-29 13:26   ` Jamie Lokier
2004-01-29 18:05     ` Ulrich Drepper
2004-01-29 19:15       ` Jamie Lokier
2004-01-29 23:59         ` john stultz
2004-01-30  0:40           ` Ulrich Drepper
2004-01-30  0:31         ` Ulrich Drepper
2004-01-30  4:17           ` Jamie Lokier
2004-01-30  5:09             ` Ulrich Drepper
2004-01-30  9:29               ` Ingo Molnar
2004-02-03  4:38                 ` Ulrich Drepper
2004-01-30 17:34               ` Jamie Lokier
2004-01-30  8:33             ` Jakub Jelinek
2004-01-30 17:21               ` Jamie Lokier
2004-01-31  0:10     ` Eric W. Biederman
2004-01-31  2:41       ` Jamie Lokier
2004-01-31  5:54         ` Eric W. Biederman
2004-02-01  1:28   ` Andrea Arcangeli
2004-02-03  4:35     ` Ulrich Drepper
2004-02-03  5:34       ` Andrea Arcangeli
2004-02-03  8:52       ` Jamie Lokier
2004-02-03 16:25         ` Andrea Arcangeli [this message]
2004-02-03 17:37           ` Jamie Lokier
2004-02-03 18:10             ` Andrea Arcangeli
2004-02-03 18:23               ` Jamie Lokier
2004-02-03 18:34                 ` Andrea Arcangeli
2004-01-31  0:17 ` Eric W. Biederman
2004-01-31  2:20   ` john stultz
     [not found] <1075344395.1592.87.camel@cog.beaverton.ibm.com.suse.lists.linux.kernel>
     [not found] ` <401894DA.7000609@redhat.com.suse.lists.linux.kernel>
     [not found]   ` <20040201012803.GN26076@dualathlon.random.suse.lists.linux.kernel>
     [not found]     ` <401F251C.2090300@redhat.com.suse.lists.linux.kernel>
     [not found]       ` <20040203085224.GA15738@mail.shareable.org.suse.lists.linux.kernel>
     [not found]         ` <20040203162515.GY26076@dualathlon.random.suse.lists.linux.kernel>
     [not found]           ` <20040203173716.GC17895@mail.shareable.org.suse.lists.linux.kernel>
     [not found]             ` <20040203181001.GA26076@dualathlon.random.suse.lists.linux.kernel>
     [not found]               ` <20040203182310.GA18326@mail.shareable.org.suse.lists.linux.kernel>
2004-02-04  2:27                 ` Andi Kleen
2004-02-04  2:40                   ` Andrea Arcangeli
2004-02-04  4:21                   ` Jamie Lokier
2004-02-05 21:43                     ` Andrea Arcangeli
2004-02-06  4:15                       ` Rik van Riel
2004-02-06  4:28                         ` Andrea Arcangeli
2004-02-06  9:23                           ` Ulrich Drepper
2004-02-06 15:49                             ` Andrea Arcangeli
2004-02-07  0:37                               ` Ulrich Drepper
2004-02-07  2:19                                 ` Andrea Arcangeli
2004-02-07  3:37                                   ` Daniel Jacobowitz
2004-02-07  4:36                                     ` Andrea Arcangeli
2004-02-07  4:53                                       ` Jamie Lokier

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=20040203162515.GY26076@dualathlon.random \
    --to=andrea@suse.de \
    --cc=drepper@redhat.com \
    --cc=jamie@shareable.org \
    --cc=johnstul@us.ibm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®