This is the mail archive of the
mailing list for the glibc project.
Re: [RFC v2] aarch64: enforce >=64K guard size
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Cc: nd at arm dot com
- Date: Mon, 18 Dec 2017 10:28:50 +0000
- Subject: Re: [RFC v2] aarch64: enforce >=64K guard size
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <5A32A3D6.email@example.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 14/12/17 16:16, Szabolcs Nagy wrote:
> - only change guard size on aarch64
> - don't report the inflated guard size
> - this is on top of
> 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 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.
> The patch does not affect threads with user allocated stacks.
> 2017-12-14 Szabolcs Nagy <firstname.lastname@example.org>
> * nptl/allocatestack.c (allocate_stack): Use ARCH_MIN_GUARD_SIZE.
> * nptl/descr.h (ARCH_MIN_GUARD_SIZE): Define.
> * sysdeps/aarch64/nptl/pthreaddef.h (ARCH_MIN_GUARD_SIZE): Define.