summaryrefslogtreecommitdiff
path: root/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch')
-rw-r--r--0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch17
1 files changed, 9 insertions, 8 deletions
diff --git a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch
index 276bac8..c406c3b 100644
--- a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch
+++ b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch
@@ -1,4 +1,4 @@
-From 4548790064d9d658127c85c8e318f0f397c63889 Mon Sep 17 00:00:00 2001
+From ad4dbce36dd2083de69815f613342257535f6274 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: ZEN: Add sysctl and CONFIG to disallow unprivileged CLONE_NEWUSER
@@ -12,10 +12,10 @@ Our default behavior continues to match the vanilla kernel.
4 files changed, 50 insertions(+)
diff --git a/init/Kconfig b/init/Kconfig
-index bd7d650d4a99..658f9c052151 100644
+index b4daad2bac23..362f82c5ec07 100644
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1091,6 +1091,22 @@ config USER_NS
+@@ -1118,6 +1118,22 @@ config USER_NS
If unsure, say N.
@@ -39,7 +39,7 @@ index bd7d650d4a99..658f9c052151 100644
bool "PID Namespaces"
default y
diff --git a/kernel/fork.c b/kernel/fork.c
-index 541fd805fb88..ffd57c812153 100644
+index 6cabc124378c..fda4986da9eb 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -106,6 +106,11 @@
@@ -54,7 +54,7 @@ index 541fd805fb88..ffd57c812153 100644
/*
* Minimum number of threads to boot the kernel
-@@ -1788,6 +1793,10 @@ static __latent_entropy struct task_struct *copy_process(
+@@ -1779,6 +1784,10 @@ static __latent_entropy struct task_struct *copy_process(
if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS))
return ERR_PTR(-EINVAL);
@@ -65,7 +65,7 @@ index 541fd805fb88..ffd57c812153 100644
/*
* Thread groups must share signals as well, and detached threads
* can only be started up within the thread group.
-@@ -2819,6 +2828,12 @@ int ksys_unshare(unsigned long unshare_flags)
+@@ -2826,6 +2835,12 @@ int ksys_unshare(unsigned long unshare_flags)
if (unshare_flags & CLONE_NEWNS)
unshare_flags |= CLONE_FS;
@@ -79,7 +79,7 @@ index 541fd805fb88..ffd57c812153 100644
if (err)
goto bad_unshare_out;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
-index 078950d9605b..baead3605bbe 100644
+index b6f2f35d0bcf..2e9c273990e8 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -110,6 +110,9 @@ extern int core_uses_pid;
@@ -92,7 +92,7 @@ index 078950d9605b..baead3605bbe 100644
extern int pid_max;
extern int pid_max_min, pid_max_max;
extern int percpu_pagelist_fraction;
-@@ -545,6 +548,15 @@ static struct ctl_table kern_table[] = {
+@@ -546,6 +549,15 @@ static struct ctl_table kern_table[] = {
.proc_handler = proc_dointvec,
},
#endif
@@ -128,3 +128,4 @@ index 8eadadc478f9..c36ecd19562c 100644
--
cgit v1.2.1-1-g437b
+