at 16.09-beta 14 lines 938 B view raw
1diff -ru a/kernel/kmod.c b/kernel/kmod.c 2--- a/kernel/kmod.c 2016-04-21 17:06:09.882281660 +0200 3+++ b/kernel/kmod.c 2016-04-21 17:08:17.458949309 +0200 4@@ -294,7 +294,9 @@ 5 strncmp(sub_info->path, "/lib/", 5) && strncmp(sub_info->path, "/lib64/", 7) && 6 strncmp(sub_info->path, "/usr/libexec/", 13) && strncmp(sub_info->path, "/usr/bin/", 9) && 7 strncmp(sub_info->path, "/usr/sbin/", 10) && strcmp(sub_info->path, "/bin/false") && 8- strcmp(sub_info->path, "/usr/share/apport/apport")) || strstr(sub_info->path, "..")) { 9+ strcmp(sub_info->path, "/usr/share/apport/apport") && 10+ strncmp(sub_info->path, "/nix/store/", 11) && 11+ strncmp(sub_info->path, "/run/current-system/systemd/lib/", 32)) || strstr(sub_info->path, "..")) { 12 printk(KERN_ALERT "grsec: denied exec of usermode helper binary %.950s located outside of permitted system paths\n", sub_info->path); 13 retval = -EPERM; 14 goto out;