From 67347f37407489a68e12da8f75b78ae1d1168de9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 27 Jul 2021 17:10:21 +0200 Subject: [PATCH 1/2] seccomp: drop getrandom() from @system-service It's included in @default now, since 14f4b1b568907350d023d1429c1aa4aaa8925f22, and since @system-service pulls that in we can drop it from @system-service. Follow-up for #20191 --- src/shared/seccomp-util.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/shared/seccomp-util.c b/src/shared/seccomp-util.c index cad0af89f2..703d5a939c 100644 --- a/src/shared/seccomp-util.c +++ b/src/shared/seccomp-util.c @@ -859,7 +859,6 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = { "get_mempolicy\0" "getcpu\0" "getpriority\0" - "getrandom\0" "ioctl\0" "ioprio_get\0" "kcmp\0" From 7df660e45682af5c40a236abe1bdc5ddcf3b3533 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 27 Jul 2021 17:11:09 +0200 Subject: [PATCH 2/2] seccomp: move sched_getaffinity() from @system-service to @default See: https://github.com/systemd/systemd/pull/20191#issuecomment-881982739 In general, we shouldn't blanket move syscalls like this into @default, given that glibc actually does have fallbacks, afaics. However, as long as the syscalls are "read-only" and thus benign, I figure it's a safe thing to do. But we should probably stick to a "if in doubt, don't" rule, and put these syscalls in @system-service as default, but not into @default. I think in the real world @system-service is the sensible group people should use, and not @default actually. --- src/shared/seccomp-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/seccomp-util.c b/src/shared/seccomp-util.c index 703d5a939c..631ca5dd34 100644 --- a/src/shared/seccomp-util.c +++ b/src/shared/seccomp-util.c @@ -331,6 +331,7 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = { "restart_syscall\0" "rseq\0" "rt_sigreturn\0" + "sched_getaffinity\0" "sched_yield\0" "set_robust_list\0" "set_thread_area\0" @@ -874,7 +875,6 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = { "remap_file_pages\0" "sched_get_priority_max\0" "sched_get_priority_min\0" - "sched_getaffinity\0" "sched_getattr\0" "sched_getparam\0" "sched_getscheduler\0"