diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2023-03-19 20:32:14 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2023-03-19 20:32:14 +0000 |
commit | b3e87e8127854e1511b3cc5e9ada88634658da5d (patch) | |
tree | a6b1c20bb9690ff3f9965a7ed80415b7442504a4 /sys/arch/powerpc64 | |
parent | 51864c134f3693dc4f3452f452bb8c5845c20c2f (diff) |
Aggressively randomize the location of the stack on all 64-bit architectures
except alpha. This will put the stack at a random location in the upper
1/4th of the userland virtual address space providing up to 26 additional
bits of randomness in the address. Skip alpha for now since it currently
puts the stack at a (for a 64-bit architecture) very low address. Skip
32-bit architectures for now as well since those have a much smaller
virtual address space and we need more time to figure out what a safe
amount of extra randomizations is. These architectures will continue to
use a mildly randomized stack address through the existing stackgap random
mechanism. We will revisit this after 7.3 is released.
This should make it harder for an attacker to find the stack.
ok deraadt@, miod@
Diffstat (limited to 'sys/arch/powerpc64')
-rw-r--r-- | sys/arch/powerpc64/include/vmparam.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/arch/powerpc64/include/vmparam.h b/sys/arch/powerpc64/include/vmparam.h index 56061429181..af8831a71ec 100644 --- a/sys/arch/powerpc64/include/vmparam.h +++ b/sys/arch/powerpc64/include/vmparam.h @@ -46,5 +46,8 @@ #define VM_MIN_ADDRESS ((vaddr_t)PAGE_SIZE) #define VM_MAXUSER_ADDRESS 0xbffffffffffff000UL #define VM_MAX_ADDRESS 0xffffffffffffffffUL +#ifdef _KERNEL +#define VM_MIN_STACK_ADDRESS 0x9000000000000000UL +#endif #define VM_MIN_KERNEL_ADDRESS 0xc000000000000000UL #define VM_MAX_KERNEL_ADDRESS 0xc0000007ffffffffUL |