Re: [Security] [PATCH] proc: avoid information leaks to non-privilegedprocesses

From: Linus Torvalds
Date: Tue May 05 2009 - 11:46:21 EST




On Tue, 5 May 2009, Linus Torvalds wrote:
>
> Note: the "pid + jiffies" is just meant to be a tiny tiny bit of noise. It
> has no real meaning. It could be anything. I just picked the previous
> seed, it's just that now we keep the state in between calls and that will
> feed into the next result, and that should make all the difference.

Actually, thinking about it, we could/should probably just remove that
tiny bit of noise.

After all, we get _real_ noise from the "keyptr->secret" thing. It's not
updated all the time, but it's certainly updated often enough that nobody
will ever see anything remotely guessable, I suspect.

Not that the "pid+jiffies" should hurt either, of course. It just doesn't
really look meaningful, and only exists as a historical oddity that
relates to the previous implementation of get_random_int().

Linus
--
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/