arm, kaslr: randomize module base address
PATCH 1/1 arm, kaslr: randomize module base address
While we don't yet have text base address randomization in ARM, we can do module base address randomization. This bumps the module base by up to 4MiB.
Signed-off-by Kees Cook <[email protected]>
--- arch/arm/Kconfig | 8 ++++++++ arch/arm/kernel/module.c | 45 ++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 3 deletions(-)
arch/arm/Kconfig +8 -0
@@ -1769,6 +1769,14 @@ config XEN help Say Y if you want to run Linux in a Virtual Machine on Xen on ARM. +config RANDOMIZE_BASE + bool "Randomize the base address of loaded modules" + depends on MMU + default n + ---help--- + Randomizes the base address at which kernel modules are loaded, + with 10 bits of entropy. At most, this will create a 4MiB gap + at the start of the kernel modules virtual address range. endmenu menu "Boot options"
arch/arm/kernel/module.c +42 -3
59 lines not on this page · raw message
Signature · 6 lines
1.9.1 -- Kees Cook Chrome OS Security