diff options
Diffstat (limited to 'pkgs/os-specific/linux/kernel/grsecurity-path-4.4.patch')
-rw-r--r-- | pkgs/os-specific/linux/kernel/grsecurity-path-4.4.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel/grsecurity-path-4.4.patch b/pkgs/os-specific/linux/kernel/grsecurity-path-4.4.patch new file mode 100644 index 0000000000000..bef1a75c23d43 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/grsecurity-path-4.4.patch @@ -0,0 +1,18 @@ +diff --git a/kernel/kmod.c b/kernel/kmod.c +index a689506..30747b4 100644 +--- a/kernel/kmod.c ++++ b/kernel/kmod.c +@@ -294,11 +294,8 @@ 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) && strncmp(sub_info->path, "/usr/bin/", 9) && +- strncmp(sub_info->path, "/usr/sbin/", 10) && +- 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, "..")) { + printk(KERN_ALERT "grsec: denied exec of usermode helper binary %.950s located outside of permitted system paths\n", sub_info->path); + retval = -EPERM; + goto out; |