This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v5] ELF: implement AT_RANDOM for glibc PRNG seeding
On Fri, Oct 3, 2008 at 10:59 AM, Kees Cook <kees.cook@canonical.com> wrote:
> While discussing[1] the need for glibc to have access to random bytes
> during program load, it seems that an earlier attempt to implement
> AT_RANDOM got stalled. This implements a random 16 byte string, available
> to every ELF program via a new auxv AT_RANDOM vector.
>
> [1] http://sourceware.org/ml/libc-alpha/2008-10/msg00006.html
>
> Signed-off-by: Kees Cook <kees.cook@canonical.com>
> ---
> fs/binfmt_elf.c | 12 ++++++++++++
> include/linux/auxvec.h | 6 +++---
> 2 files changed, 15 insertions(+), 3 deletions(-)
This version is OK with me as long as the get_random_bytes call is
producing 16 reasonably random bytes. If the random data generation
is changed at some point I'd want to have very strong PRNG for
binaries which have AT_SECURE set.
Acked-by: Ulrich Drepper <drepper@redhat.com>