Kernel: Activate CONFIG_HARDENED_USERCOPY
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 7 Apr 2019 14:38:44 +0000 (16:38 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 11 May 2019 15:15:41 +0000 (17:15 +0200)
This adds additional checks to the copy_from_user() and copy_to_user()
functions. The details are described in this article:
https://lwn.net/Articles/695991/

This should only have a very small performance impact on system calls
and should not affect routing performance.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/generic/config-4.14
target/linux/generic/config-4.19
target/linux/generic/config-4.9

index 396139cb3926683db61fa26a713b368e78b53dde..4154314951f69c649b5c288c7b7785396155d6ff 100644 (file)
@@ -1593,7 +1593,8 @@ CONFIG_GENERIC_NET_UTILS=y
 # CONFIG_HAMACHI is not set
 # CONFIG_HAMRADIO is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_HARDENED_USERCOPY is not set
+CONFIG_HARDENED_USERCOPY=y
+# CONFIG_HARDENED_USERCOPY_PAGESPAN is not set
 # CONFIG_HARDLOCKUP_DETECTOR is not set
 # CONFIG_HAVE_AOUT is not set
 CONFIG_HAVE_ARCH_HARDENED_USERCOPY=y
index a4b5a7d0725219e83d967ad9c7d111ef8b63d3f0..48d0094bb460804ed2bb25a1f652e1f5d27b8909 100644 (file)
@@ -1688,7 +1688,9 @@ CONFIG_GPIOLIB_FASTPATH_LIMIT=512
 # CONFIG_HAMACHI is not set
 # CONFIG_HAMRADIO is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_HARDENED_USERCOPY is not set
+CONFIG_HARDENED_USERCOPY=y
+# CONFIG_HARDENED_USERCOPY_FALLBACK is not set
+# CONFIG_HARDENED_USERCOPY_PAGESPAN is not set
 CONFIG_HARDEN_EL2_VECTORS=y
 # CONFIG_HARDLOCKUP_DETECTOR is not set
 # CONFIG_HAVE_AOUT is not set
index 1ed16edf0239de208da6a7f9ef01e030ef234de1..cf50b4919cc91029e645ebbe53307519b0b9610b 100644 (file)
@@ -1439,7 +1439,8 @@ CONFIG_GENERIC_NET_UTILS=y
 # CONFIG_HAMACHI is not set
 # CONFIG_HAMRADIO is not set
 # CONFIG_HAPPYMEAL is not set
-# CONFIG_HARDENED_USERCOPY is not set
+CONFIG_HARDENED_USERCOPY=y
+# CONFIG_HARDENED_USERCOPY_PAGESPAN is not set
 # CONFIG_HARDLOCKUP_DETECTOR is not set
 # CONFIG_HAVE_AOUT is not set
 CONFIG_HAVE_ARCH_HARDENED_USERCOPY=y