summarylogtreecommitdiffstats
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.patch24
1 files changed, 12 insertions, 12 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 d00d967d7c92..a4630f6898c5 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,7 +1,7 @@
-From 9d3a77d68441f82ae970418e45de3d3db14daabc Mon Sep 17 00:00:00 2001
+From 9d9743a00d2244e8e86f51583516a86f40f36c62 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/3] ZEN: Add sysctl and CONFIG to disallow unprivileged
+Subject: [PATCH 1/4] ZEN: Add sysctl and CONFIG to disallow unprivileged
CLONE_NEWUSER
Our default behavior continues to match the vanilla kernel.
@@ -36,7 +36,7 @@ index 6030a8235..60b7fe5fa 100644
{
return &init_user_ns;
diff --git a/init/Kconfig b/init/Kconfig
-index bee58f746..859989666 100644
+index 664bedb9a..746e382ad 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1247,6 +1247,22 @@ config USER_NS
@@ -63,12 +63,12 @@ index bee58f746..859989666 100644
bool "PID Namespaces"
default y
diff --git a/kernel/fork.c b/kernel/fork.c
-index 0d944e92a..5449c990a 100644
+index aebb3e6c9..f186c7298 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
-@@ -102,6 +102,10 @@
- #include <linux/iommu.h>
- #include <linux/rseq.h>
+@@ -104,6 +104,10 @@
+ #include <uapi/linux/pidfd.h>
+ #include <linux/pidfs.h>
+#ifdef CONFIG_USER_NS
+#include <linux/user_namespace.h>
@@ -77,7 +77,7 @@ index 0d944e92a..5449c990a 100644
#include <asm/pgalloc.h>
#include <linux/uaccess.h>
#include <asm/mmu_context.h>
-@@ -2260,6 +2264,10 @@ __latent_entropy struct task_struct *copy_process(
+@@ -2154,6 +2158,10 @@ __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 0d944e92a..5449c990a 100644
/*
* Thread groups must share signals as well, and detached threads
* can only be started up within the thread group.
-@@ -3406,6 +3414,12 @@ int ksys_unshare(unsigned long unshare_flags)
+@@ -3301,6 +3309,12 @@ int ksys_unshare(unsigned long unshare_flags)
if (unshare_flags & CLONE_NEWNS)
unshare_flags |= CLONE_FS;
@@ -102,7 +102,7 @@ index 0d944e92a..5449c990a 100644
if (err)
goto bad_unshare_out;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
-index 157f7ce29..881fc4f5d 100644
+index 81cc97491..db581894e 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -80,6 +80,9 @@
@@ -132,7 +132,7 @@ index 157f7ce29..881fc4f5d 100644
{
.procname = "tainted",
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
-index ce4d99df5..8272e2e35 100644
+index 0b0b95418..c4b835b91 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -22,6 +22,13 @@
@@ -150,5 +150,5 @@ index ce4d99df5..8272e2e35 100644
static DEFINE_MUTEX(userns_state_mutex);
--
-2.44.0
+2.45.1