summaryrefslogtreecommitdiff
path: root/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch')
-rw-r--r--0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch17
1 files changed, 8 insertions, 9 deletions
diff --git a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
index a0f8524..04852f6 100644
--- a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
+++ b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
@@ -1,8 +1,7 @@
-From ace933a17f0b2e6e75e5ed330e8c12efae62aa53 Mon Sep 17 00:00:00 2001
+From 673deeaa0505b542ef9516a42ced24d724c2cc6f 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 01/16] ZEN: Add sysctl and CONFIG to disallow unprivileged
- CLONE_NEWUSER
+Subject: ZEN: Add sysctl and CONFIG to disallow unprivileged CLONE_NEWUSER
Our default behavior continues to match the vanilla kernel.
---
@@ -13,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 b4daad2bac23..362f82c5ec07 100644
+index a34064a031a5..0342f34271b3 100644
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1118,6 +1118,22 @@ config USER_NS
+@@ -1102,6 +1102,22 @@ config USER_NS
If unsure, say N.
@@ -40,7 +39,7 @@ index b4daad2bac23..362f82c5ec07 100644
bool "PID Namespaces"
default y
diff --git a/kernel/fork.c b/kernel/fork.c
-index 755d8160e001..ed909f8050b2 100644
+index 080809560072..1cb7b827b57b 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -106,6 +106,11 @@
@@ -55,7 +54,7 @@ index 755d8160e001..ed909f8050b2 100644
/*
* Minimum number of threads to boot the kernel
-@@ -1779,6 +1784,10 @@ static __latent_entropy struct task_struct *copy_process(
+@@ -1843,6 +1848,10 @@ static __latent_entropy struct task_struct *copy_process(
if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS))
return ERR_PTR(-EINVAL);
@@ -66,7 +65,7 @@ index 755d8160e001..ed909f8050b2 100644
/*
* Thread groups must share signals as well, and detached threads
* can only be started up within the thread group.
-@@ -2836,6 +2845,12 @@ int ksys_unshare(unsigned long unshare_flags)
+@@ -2923,6 +2932,12 @@ int ksys_unshare(unsigned long unshare_flags)
if (unshare_flags & CLONE_NEWNS)
unshare_flags |= CLONE_FS;
@@ -128,5 +127,5 @@ index 8eadadc478f9..c36ecd19562c 100644
static DEFINE_MUTEX(userns_state_mutex);
--
-2.25.0
+cgit v1.2.1-1-g437b