From b9d81282e0dbfdae795b38c26879716d7860bcf9 Mon Sep 17 00:00:00 2001 From: Peter Gerber Date: Sun, 5 Jan 2020 15:48:54 +0100 Subject: [PATCH 1/2] Fix sandbox crash during reload of logging configuration Allow calls to dup() which was introduced in commit a22fbab986. From a security perspective, I don't think this should impact the security of the sandbox significantly. As far as I can tell, there is nothing an adversary can do with a duplicated FD that can't be done with the original. --- changes/bug32877 | 4 ++++ src/lib/sandbox/sandbox.c | 1 + 2 files changed, 5 insertions(+) create mode 100644 changes/bug32877 diff --git a/changes/bug32877 b/changes/bug32877 new file mode 100644 index 0000000000..96fe1af708 --- /dev/null +++ b/changes/bug32877 @@ -0,0 +1,4 @@ +o Minor bugfixes (linux seccomp sandbox): + - Fix crash when reloading logging configuration while the + experimental sandbox is enabled. Fixes bug 29150; bugfix + on 0.4.1.7. Patch by Peter Gerber. diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c index faaf463f29..7e6354d880 100644 --- a/src/lib/sandbox/sandbox.c +++ b/src/lib/sandbox/sandbox.c @@ -143,6 +143,7 @@ static int filter_nopar_gen[] = { SCMP_SYS(clock_gettime), SCMP_SYS(close), SCMP_SYS(clone), + SCMP_SYS(dup), SCMP_SYS(epoll_create), SCMP_SYS(epoll_wait), #ifdef __NR_epoll_pwait From f5461a4bdf343a0572b0594fa33af37ce1be9d8f Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 6 Jan 2020 08:08:48 -0500 Subject: [PATCH 2/2] update changes file to pass "make check-changes" --- changes/bug32841 | 4 ++++ changes/bug32877 | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 changes/bug32841 delete mode 100644 changes/bug32877 diff --git a/changes/bug32841 b/changes/bug32841 new file mode 100644 index 0000000000..48568f6a61 --- /dev/null +++ b/changes/bug32841 @@ -0,0 +1,4 @@ + o Minor bugfixes (linux seccomp sandbox): + - Fix crash when reloading logging configuration while the + experimental sandbox is enabled. Fixes bug 32841; bugfix + on 0.4.1.7. Patch by Peter Gerber. diff --git a/changes/bug32877 b/changes/bug32877 deleted file mode 100644 index 96fe1af708..0000000000 --- a/changes/bug32877 +++ /dev/null @@ -1,4 +0,0 @@ -o Minor bugfixes (linux seccomp sandbox): - - Fix crash when reloading logging configuration while the - experimental sandbox is enabled. Fixes bug 29150; bugfix - on 0.4.1.7. Patch by Peter Gerber.