Skip to contentSkip to conversation

arm, kaslr: randomize module base address

PATCH New Kees Cook 1 participant 1 message Sep 18, 2014 Arm (32-bit)

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

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.

---
 arch/arm/Kconfig         |  8 ++++++++
 arch/arm/kernel/module.c | 45 ++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 50 insertions(+), 3 deletions(-)
arch/arm/Kconfig +8 -0
index 32cbbd565902..47b03360aa51 100644
@@ -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