Re: [PATCH] ELF: implement AT_RANDOM for future glibc use

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Kees Cook <kees.cook@...>
Cc: Andi Kleen <andi@...>, Roland McGrath <roland@...>, <linux-kernel@...>, Jakub Jelinek <jakub@...>, Ulrich Drepper <drepper@...>, <libc-alpha@...>
Date: Monday, October 6, 2008 - 7:28 pm

On Mon, Oct 06, 2008 at 03:07:59PM -0700, Kees Cook wrote:

random32() is not a cryptographically strong RNG. I suspect it would
be pretty easy to reverse engineer its seed given some state. It hasn't
been designed to be protected against that.

While I suspect this wouldn't be a serious threat to the security
model for mmap (to break the mmap placement you would still need quite a lot of
addresses before you can predict some and I presume most apps do not leak
addresses) it would seem unnecessarily 
weak to me because using a better algorithm is not very costly.
Also it might be a problem for some of the other potential users.

cryptographically strong RNGs are especially designed to make this
reverse engineering of the state hard. 

Simple ones can be just a cryptographic hash + counter + secret or
the same with a encryption algorithm like AES, but there are 
also algorithms who are especially designed for this like yarrow/fortuna

See
http://en.wikipedia.org/wiki/Cryptographically_secure_pseudo-random_number_generator

-Andi

-- 
ak@linux.intel.com
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] ELF: implement AT_RANDOM for future glibc use, Roland McGrath, (Mon Oct 6, 7:58 pm)
Re: [PATCH] ELF: implement AT_RANDOM for future glibc use, Ulrich Drepper, (Mon Oct 6, 8:57 pm)
Re: [PATCH] ELF: implement AT_RANDOM for future glibc use, Ulrich Drepper, (Mon Oct 6, 9:51 pm)
Re: [PATCH] ELF: implement AT_RANDOM for future glibc use, Ulrich Drepper, (Mon Oct 6, 8:08 pm)
Re: [PATCH] ELF: implement AT_RANDOM for future glibc use, Andi Kleen, (Mon Oct 6, 7:28 pm)
Re: [PATCH] ELF: implement AT_RANDOM for future glibc use, Roland McGrath, (Thu Oct 2, 8:52 pm)
Re: [PATCH] ELF: implement AT_RANDOM for future glibc use, Roland McGrath, (Fri Oct 3, 4:22 pm)
Re: [PATCH] ELF: implement AT_RANDOM for future glibc use, Arjan van de Ven, (Fri Oct 3, 1:57 am)
Re: [PATCH] ELF: implement AT_RANDOM for future glibc use, Ulrich Drepper, (Fri Oct 3, 2:25 am)