diff options
Diffstat (limited to 'libre/linux-libre/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch')
-rw-r--r-- | libre/linux-libre/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libre/linux-libre/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/libre/linux-libre/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch index ca95df44e..5e2073d65 100644 --- a/libre/linux-libre/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch +++ b/libre/linux-libre/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch @@ -1,4 +1,4 @@ -From ee973f29fd8052778034537949843b801e888c58 Mon Sep 17 00:00:00 2001 +From 727065d1ff38991dd7a734fe69d55a8fabbf6f54 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> Date: Mon, 16 Sep 2019 04:53:20 +0200 Subject: [PATCH 1/2] ZEN: Add sysctl and CONFIG to disallow unprivileged @@ -36,10 +36,10 @@ index 6ef1c7109fc4..2140091b0b8d 100644 { return &init_user_ns; diff --git a/init/Kconfig b/init/Kconfig -index 0498af567f70..078a0b73effd 100644 +index 2a5df1cf838c..bdaf777b9976 100644 --- a/init/Kconfig +++ b/init/Kconfig -@@ -1140,6 +1140,22 @@ config USER_NS +@@ -1169,6 +1169,22 @@ config USER_NS If unsure, say N. @@ -63,12 +63,12 @@ index 0498af567f70..078a0b73effd 100644 bool "PID Namespaces" default y diff --git a/kernel/fork.c b/kernel/fork.c -index efc5493203ae..90859b7531d3 100644 +index 5fe09d4e6d6a..36756b715103 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -96,6 +96,10 @@ - #include <linux/kasan.h> +@@ -97,6 +97,10 @@ #include <linux/scs.h> + #include <linux/io_uring.h> +#ifdef CONFIG_USER_NS +#include <linux/user_namespace.h> @@ -77,7 +77,7 @@ index efc5493203ae..90859b7531d3 100644 #include <asm/pgalloc.h> #include <linux/uaccess.h> #include <asm/mmu_context.h> -@@ -1861,6 +1865,10 @@ static __latent_entropy struct task_struct *copy_process( +@@ -1862,6 +1866,10 @@ static __latent_entropy struct task_struct *copy_process( if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS)) return ERR_PTR(-EINVAL); @@ -88,7 +88,7 @@ index efc5493203ae..90859b7531d3 100644 /* * Thread groups must share signals as well, and detached threads * can only be started up within the thread group. -@@ -2961,6 +2969,12 @@ int ksys_unshare(unsigned long unshare_flags) +@@ -2927,6 +2935,12 @@ int ksys_unshare(unsigned long unshare_flags) if (unshare_flags & CLONE_NEWNS) unshare_flags |= CLONE_FS; @@ -102,7 +102,7 @@ index efc5493203ae..90859b7531d3 100644 if (err) goto bad_unshare_out; diff --git a/kernel/sysctl.c b/kernel/sysctl.c -index db1ce7af2563..9b73467e279d 100644 +index afad085960b8..a94828fb31c2 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -103,6 +103,9 @@ @@ -115,7 +115,7 @@ index db1ce7af2563..9b73467e279d 100644 #if defined(CONFIG_SYSCTL) -@@ -1882,6 +1885,15 @@ static struct ctl_table kern_table[] = { +@@ -1902,6 +1905,15 @@ static struct ctl_table kern_table[] = { .proc_handler = proc_dointvec, }, #endif @@ -150,5 +150,5 @@ index 87804e0371fe..66b5afb0d0ee 100644 static DEFINE_MUTEX(userns_state_mutex); -- -2.28.0 +2.29.2 |