aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-grsec/fix-memory-map-for-PIE-applications.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/linux-grsec/fix-memory-map-for-PIE-applications.patch')
-rw-r--r--main/linux-grsec/fix-memory-map-for-PIE-applications.patch2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/linux-grsec/fix-memory-map-for-PIE-applications.patch b/main/linux-grsec/fix-memory-map-for-PIE-applications.patch
index 0ef81cf93f..e38716f77b 100644
--- a/main/linux-grsec/fix-memory-map-for-PIE-applications.patch
+++ b/main/linux-grsec/fix-memory-map-for-PIE-applications.patch
@@ -58,7 +58,7 @@ index 6f036ed..06419af 100644
- load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
+ load_bias = (get_random_int() & STACK_RND_MASK) << PAGE_SHIFT;
#endif
-+ load_bias = ELF_PAGESTART(vaddr + load_bias);
++ load_bias = ELF_PAGESTART(load_bias - vaddr);
#ifdef CONFIG_PAX_RANDMMAP
/* PaX: randomize base address at the default exe base if requested */