Re: [Security] [PATCH] proc: avoid information leaks tonon-privileged processes

From: Ingo Molnar
Date: Thu May 07 2009 - 14:22:58 EST



* Matt Mackall <mpm@xxxxxxxxxxx> wrote:

> > aldebaran:~/l> ./lat_proc fork
> > Process fork+exit: 61.7865 microseconds
>
> Uh, what? There's no exec() involved in fork+exit, so hopefully
> ASLR doesn't decide to make an appearance.

We use it to seed the per task stackprotector secret. Look for
get_random_int() in kernel/fork.c.

(
Now, if get_random_int() slows down we could certainly water that
down and have a system-wide secret and some easy and fast
long-cycle permutation code to make it not so easy to figure out
the core secret from a kernel crash signature.

[ Alas, that might be worth doing in any case - to not have
get_random_int() in the clone() / pthread_create() fastpath. ]

We really need a design decision there - if get_random_int() is
supposed to be a mathematically safe hash, ignoring the physics of
the world, then we need a separate get_random_int_fast() API or
so. All current users of get_random_int() will evaporate as well.
)

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/