OSDN Git Service

Revert "stack protector: use AT_RANDOM"
authorNick Kralevich <nnk@google.com>
Wed, 16 Jan 2013 21:13:22 +0000 (13:13 -0800)
committerNick Kralevich <nnk@google.com>
Wed, 16 Jan 2013 21:16:42 +0000 (13:16 -0800)
commit36bd371e26c716cbc18e11801b13eff0352d91b0
treeb63e06f7a65f3ac2df09449bb65172644f230386
parentba117e4172fe6f160bf5f4d58b37e12c08c34245
Revert "stack protector: use AT_RANDOM"

The AT_RANDOM changes broke setuid / setgid executables
such as "ping". When the linker executes a setuid program,
it cleans the environment, removing any invalid environment
entries, and adding "NULL"s to the end of the environment
array for each removed variable. Later on, we try to determine
the location of the aux environment variable, and get tripped
up by these extra NULLs.

Reverting this patch will get setuid executables working again,
but getauxval() is still broken for setuid programs because of
this bug.

This reverts commit e3a49a8661125f24aec8a1453e54b3b78005e21e.

Change-Id: I05c58a896b1fe32cfb5d95d43b096045cda0aa4a
libc/bionic/libc_init_common.c
libc/bionic/libc_init_static.c
libc/private/bionic_ssp.h
libc/private/bionic_tls.h
linker/linker.cpp
tests/stack_protector_test.cpp