summarylogtreecommitdiffstats
path: root/0003-arch-Kconfig-Default-to-maximum-amount-of-ASLR-bits.patch
diff options
context:
space:
mode:
Diffstat (limited to '0003-arch-Kconfig-Default-to-maximum-amount-of-ASLR-bits.patch')
-rw-r--r--0003-arch-Kconfig-Default-to-maximum-amount-of-ASLR-bits.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/0003-arch-Kconfig-Default-to-maximum-amount-of-ASLR-bits.patch b/0003-arch-Kconfig-Default-to-maximum-amount-of-ASLR-bits.patch
new file mode 100644
index 000000000000..9223dae367f2
--- /dev/null
+++ b/0003-arch-Kconfig-Default-to-maximum-amount-of-ASLR-bits.patch
@@ -0,0 +1,36 @@
+From e48fc436c0546b349d510ba457097bd99f3f526c Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
+Date: Sat, 13 Jan 2024 15:29:25 +0100
+Subject: [PATCH 3/4] arch/Kconfig: Default to maximum amount of ASLR bits
+
+To mitigate https://zolutal.github.io/aslrnt/; do this with a patch to
+avoid having to enable `CONFIG_EXPERT`.
+---
+ arch/Kconfig | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/Kconfig b/arch/Kconfig
+index 30f793027..318a4e750 100644
+--- a/arch/Kconfig
++++ b/arch/Kconfig
+@@ -1033,7 +1033,7 @@ config ARCH_MMAP_RND_BITS
+ int "Number of bits to use for ASLR of mmap base address" if EXPERT
+ range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX
+ default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT
+- default ARCH_MMAP_RND_BITS_MIN
++ default ARCH_MMAP_RND_BITS_MAX
+ depends on HAVE_ARCH_MMAP_RND_BITS
+ help
+ This value can be used to select the number of bits to use to
+@@ -1067,7 +1067,7 @@ config ARCH_MMAP_RND_COMPAT_BITS
+ int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT
+ range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX
+ default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
+- default ARCH_MMAP_RND_COMPAT_BITS_MIN
++ default ARCH_MMAP_RND_COMPAT_BITS_MAX
+ depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
+ help
+ This value can be used to select the number of bits to use to
+--
+2.45.1
+