summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/grsec-path.patch
diff options
context:
space:
mode:
authorRemy Goldschmidt <taktoa@gmail.com>2015-03-29 13:15:31 -0400
committerRemy Goldschmidt <taktoa@gmail.com>2015-03-29 14:26:00 -0400
commitd68e2484185d5b738d8342116215fac2d1596667 (patch)
treef361c6881117a2e2ad2f3cf530bb156788db2bbd /pkgs/os-specific/linux/kernel/grsec-path.patch
parentba4f29aee6c431254f1c6d3fb6f37b2e643127d2 (diff)
downloadnixlib-d68e2484185d5b738d8342116215fac2d1596667.tar
nixlib-d68e2484185d5b738d8342116215fac2d1596667.tar.gz
nixlib-d68e2484185d5b738d8342116215fac2d1596667.tar.bz2
nixlib-d68e2484185d5b738d8342116215fac2d1596667.tar.lz
nixlib-d68e2484185d5b738d8342116215fac2d1596667.tar.xz
nixlib-d68e2484185d5b738d8342116215fac2d1596667.tar.zst
nixlib-d68e2484185d5b738d8342116215fac2d1596667.zip
Fixed grsec-path.patch
Diffstat (limited to 'pkgs/os-specific/linux/kernel/grsec-path.patch')
-rw-r--r--pkgs/os-specific/linux/kernel/grsec-path.patch19
1 files changed, 10 insertions, 9 deletions
diff --git a/pkgs/os-specific/linux/kernel/grsec-path.patch b/pkgs/os-specific/linux/kernel/grsec-path.patch
index 6f59cf8d80bd..e409f4a1638d 100644
--- a/pkgs/os-specific/linux/kernel/grsec-path.patch
+++ b/pkgs/os-specific/linux/kernel/grsec-path.patch
@@ -1,17 +1,18 @@
-diff --git a/kernel/kmod.c b/kernel/kmod.c
-index 67f7981..03f127d 100644
---- a/kernel/kmod.c
-+++ b/kernel/kmod.c
-@@ -246,9 +246,9 @@ static int ____call_usermodehelper(void *data)
+diff --git a/a/kernel/kmod.c b/b/kernel/kmod.c
+index a26e825..29baec1 100644
+--- a/a/kernel/kmod.c
++++ b/b/kernel/kmod.c
+@@ -294,10 +294,9 @@ static int ____call_usermodehelper(void *data)
  	   out the path to be used prior to this point and are now operating
  	   on that copy
  	*/
 -	if ((strncmp(sub_info->path, "/sbin/", 6) && strncmp(sub_info->path, "/usr/lib/", 9) &&
 -	     strncmp(sub_info->path, "/lib/", 5) && strncmp(sub_info->path, "/lib64/", 7) &&
+-	     strncmp(sub_info->path, "/usr/libexec/", 13) &&
 -	     strcmp(sub_info->path, "/usr/share/apport/apport")) || strstr(sub_info->path, "..")) {
-+	if ((strncmp(sub_info->path, "/sbin/", 6) && strncmp(sub_info->path, "/nix/store/", 11) &&
-+	     strncmp(sub_info->path, "/run/current-system/systemd/lib/", 32)) ||
-+	     strstr(sub_info->path, "..")) {
++        if ((strncmp(sub_info->path, "/sbin/", 6) && strncmp(sub_info->path, "/nix/store/", 11) &&
++             strncmp(sub_info->path, "/run/current-system/systemd/lib/", 32)) ||
++             strstr(sub_info->path, "..")) {
  		printk(KERN_ALERT "grsec: denied exec of usermode helper binary %.950s located outside of /sbin and system library paths\n", sub_info->path);
  		retval = -EPERM;
- 		goto fail;
+ 		goto out;