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.patch18
1 files changed, 9 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 3d9af57..48371cd 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,4 +1,4 @@
-From 9dda33cd8d3d2feb086a5cb7f7392cda483939ee Mon Sep 17 00:00:00 2001
+From 048c6dda33c592ef025b372311eede5e05ef9cb7 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
@@ -35,10 +35,10 @@ index 6ef1c7109fc4..2140091b0b8d 100644
{
return &init_user_ns;
diff --git a/init/Kconfig b/init/Kconfig
-index d6a0b31b13dc..2420d38cbfb9 100644
+index 0872a5a2e759..a40d8afeb1bb 100644
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1168,6 +1168,22 @@ config USER_NS
+@@ -1173,6 +1173,22 @@ config USER_NS
If unsure, say N.
@@ -62,12 +62,12 @@ index d6a0b31b13dc..2420d38cbfb9 100644
bool "PID Namespaces"
default y
diff --git a/kernel/fork.c b/kernel/fork.c
-index a9ce750578ca..0da8704c3d91 100644
+index 6d266388d380..635146a691c1 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>
@@ -76,7 +76,7 @@ index a9ce750578ca..0da8704c3d91 100644
#include <asm/pgalloc.h>
#include <linux/uaccess.h>
#include <asm/mmu_context.h>
-@@ -1860,6 +1864,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);
@@ -87,7 +87,7 @@ index a9ce750578ca..0da8704c3d91 100644
/*
* Thread groups must share signals as well, and detached threads
* can only be started up within the thread group.
-@@ -2921,6 +2929,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;
@@ -131,7 +131,7 @@ index afad085960b8..a94828fb31c2 100644
{
.procname = "tainted",
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
-index 87804e0371fe..66b5afb0d0ee 100644
+index e703d5d9cbe8..5758274feaee 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -21,6 +21,13 @@