aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-07-22 11:59:00 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-07-22 11:59:00 +0200
commitf3ad68446455acbe562e0057931e6256b8b991e8 (patch)
tree417ac927b0899ea1c5b190b0f6574e9ce8415b6a /sys/linux
parentbe348f6db38c583b804772f246e68146e52d20f4 (diff)
executor: drop CAP_SYS_NICE
A process with CAP_SYS_NICE can bring kernel down by asking for too high SCHED_DEADLINE priority, as the result rcu and other system services that use kernel threads will stop functioning. Some parameters for SCHED_DEADLINE should be OK, but we don't have means to enforce values of indirect syscall arguments. Peter Zijlstra proposed sysctl_deadline_period_{min,max} which could be used to enfore safe limits without droppping CAP_SYS_NICE, but we don't have it yet. See the following bug for details: https://groups.google.com/forum/#!topic/syzkaller-bugs/G6Wl_PKPIWI
Diffstat (limited to 'sys/linux')
-rw-r--r--sys/linux/test/caps3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/linux/test/caps b/sys/linux/test/caps
index f3ef3a9e0..6f580210e 100644
--- a/sys/linux/test/caps
+++ b/sys/linux/test/caps
@@ -3,3 +3,6 @@
# requires: -sandbox=
ptrace(0x10, 0x1) # EPERM
+sched_setattr(0x0, &AUTO={AUTO, 0x6, 0x0, 0x0, 0x0, 0x8000000009917, 0x400000000000fffd, 0x0}, 0x0) # EPERM
+sched_setattr(0x0, &AUTO={AUTO, 0x0, 0x0, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0}, 0x0) # EPERM
+sched_setattr(0x0, &AUTO={AUTO, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0}, 0x0)