aboutsummaryrefslogtreecommitdiffstats
path: root/csource
diff options
context:
space:
mode:
Diffstat (limited to 'csource')
-rw-r--r--csource/common.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/csource/common.go b/csource/common.go
index 2551cbbb9..bceb3907d 100644
--- a/csource/common.go
+++ b/csource/common.go
@@ -1473,6 +1473,8 @@ static int do_sandbox_setuid(int executor_pid, bool enable_tun)
if (syscall(SYS_setresuid, nobody, nobody, nobody))
fail("failed to setresuid");
+ prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
+
loop();
doexit(1);
}
@@ -1530,6 +1532,10 @@ static int namespace_sandbox_proc(void* arg)
fail("mkdir failed");
if (mount("/dev", "./syz-tmp/newroot/dev", NULL, MS_BIND | MS_REC | MS_PRIVATE, NULL))
fail("mount(dev) failed");
+ if (mkdir("./syz-tmp/newroot/proc", 0700))
+ fail("mkdir failed");
+ if (mount(NULL, "./syz-tmp/newroot/proc", "proc", 0, NULL))
+ fail("mount(proc) failed");
if (mkdir("./syz-tmp/pivot", 0777))
fail("mkdir failed");
if (syscall(SYS_pivot_root, "./syz-tmp", "./syz-tmp/pivot")) {