glibc/sysdeps
Szabolcs Nagy 238032ead6 aarch64: enforce >=64K guard size [BZ #26691]
There are several compiler implementations that allow large stack
allocations to jump over the guard page at the end of the stack and
corrupt memory beyond that. See CVE-2017-1000364.

Compilers can emit code to probe the stack such that the guard page
cannot be skipped, but on aarch64 the probe interval is 64K by default
instead of the minimum supported page size (4K).

This patch enforces at least 64K guard on aarch64 unless the guard
is disabled by setting its size to 0.  For backward compatibility
reasons the increased guard is not reported, so it is only observable
by exhausting the address space or parsing /proc/self/maps on linux.

On other targets the patch has no effect. If the stack probe interval
is larger than a page size on a target then ARCH_MIN_GUARD_SIZE can
be defined to get large enough stack guard on libc allocated stacks.

The patch does not affect threads with user allocated stacks.

Fixes bug 26691.
2020-10-02 09:57:44 +01:00
..
aarch64 aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
alpha aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
arc aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
arm aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
csky aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
generic Linux: Remove rseq support 2020-07-16 17:55:35 +02:00
gnu string: Fix strerrorname_np return value [BZ #26555] 2020-09-29 13:56:06 -03:00
hppa aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
htl htl: Move cleanup handling to non-private libc-lock 2020-06-28 00:13:57 +00:00
hurd hurd: Fix build-many-glibcs.py 2020-07-13 14:25:03 -03:00
i386 aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
ia64 aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
ieee754 math: Fix inaccuracy of j0f for x >= 2^127 when sin(x)+cos(x) is tiny 2020-08-07 16:33:13 -03:00
m68k aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
mach hurd: add ST_RELATIME 2020-09-27 18:23:27 +02:00
microblaze aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
mips aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
nios2 aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
nptl nptl: futex: Move __NR_futex_time64 alias to beginning of futex-internal.h 2020-09-30 09:38:10 +02:00
posix Remove internal usage of extensible stat functions 2020-09-11 14:35:32 -03:00
powerpc aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
pthread C11 threads: Fix inaccuracies in testsuite 2020-09-07 11:42:52 +02:00
riscv aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
s390 aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
sh aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
sparc aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00
unix sysvipc: Fix semtimedop for Linux < 5.1 for 64-bit ABI 2020-09-30 18:03:51 -03:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
x86 Reversing calculation of __x86_shared_non_temporal_threshold 2020-09-28 22:10:39 +00:00
x86_64 aarch64: enforce >=64K guard size [BZ #26691] 2020-10-02 09:57:44 +01:00