This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix default stack guard.
- From: Andreas Jaeger <aj at suse dot com>
- To: libc-alpha at sourceware dot org
- Date: Mon, 5 Mar 2012 11:07:28 +0100
- Subject: Re: Fix default stack guard.
- References: <4F3BE241.9090409@mentor.com>
On Wednesday, February 15, 2012 17:50:09 Tom de Vries wrote:
> Hi,
>
> the following tests fail with glibc trunk for i686-pc-linux-gnu running
> on an ubuntu 2.6.24-28-server kernel:
> - elf/tst-stackguard1
> - elf/tst-stackguard1-static
> - nptl/tst-stackguard1
> - nptl/tst-stackguard1-static
>
> The tests fail because the default stack guard in the testcases is not
> the same as the one in _dl_setup_stack_chk_guard in
> sysdeps/unix/sysv/linux/dl-osinfo.h.
>
> The reasons for which we choose (in _dl_setup_stack_chk_guard) to use
> the default stack guard are:
> - __ASSUME_AT_RANDOM is not defined. This is because we compile with
> --enable-kernel=2.6.9. AT_RANDOM is supported from 2.6.29 onwards.
> - _dl_random is NULL. This is because the ubuntu 2.6.24-28-server
> kernel doesn't support AT_RANDOM, so it doesn't pass it in the
> auxiliary vector, so _dl_random is not set in _dl_sysdep_start.
> - ENABLE_STACKGUARD_RANDOMIZE is not defined, because
> --enable-stackguard-randomization is not used.
>
> The patch fixes the failing test-cases by restoring the default stack
> guard to what it was before the commit 'Make stack canary value harder
> to read through read overflow'
> (15a856b1090669df0aec536edbdf240e71a470ca).
>
> Tested on i686-pc-linux-gnu/2.6.24-28-server system.
Thanks, committed to glibc master,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126