diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | sandbox-systrace.c | 10 |
2 files changed, 15 insertions, 2 deletions
@@ -4,6 +4,13 @@ | |||
4 | [sandbox-systrace.c] | 4 | [sandbox-systrace.c] |
5 | permit SYS_getentropy | 5 | permit SYS_getentropy |
6 | from matthew | 6 | from matthew |
7 | - matthew@cvs.openbsd.org 2014/06/18 02:59:13 | ||
8 | [sandbox-systrace.c] | ||
9 | Now that we have a dedicated getentropy(2) system call for | ||
10 | arc4random(3), we can disallow __sysctl(2) in OpenSSH's systrace | ||
11 | sandbox. | ||
12 | |||
13 | ok djm | ||
7 | 14 | ||
8 | 20140618 | 15 | 20140618 |
9 | - (tim) [openssh/session.c] Work around to get chroot sftp working on UnixWare | 16 | - (tim) [openssh/session.c] Work around to get chroot sftp working on UnixWare |
diff --git a/sandbox-systrace.c b/sandbox-systrace.c index c48f621f7..41cf489c5 100644 --- a/sandbox-systrace.c +++ b/sandbox-systrace.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sandbox-systrace.c,v 1.10 2014/06/13 08:26:29 deraadt Exp $ */ | 1 | /* $OpenBSD: sandbox-systrace.c,v 1.11 2014/06/18 02:59:13 matthew Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2011 Damien Miller <djm@mindrot.org> | 3 | * Copyright (c) 2011 Damien Miller <djm@mindrot.org> |
4 | * | 4 | * |
@@ -52,11 +52,17 @@ struct sandbox_policy { | |||
52 | static const struct sandbox_policy preauth_policy[] = { | 52 | static const struct sandbox_policy preauth_policy[] = { |
53 | { SYS_open, SYSTR_POLICY_NEVER }, | 53 | { SYS_open, SYSTR_POLICY_NEVER }, |
54 | 54 | ||
55 | #ifdef SYS_getentropy | ||
56 | /* OpenBSD 5.6 and newer use getentropy(2) to seed arc4random(3). */ | ||
57 | { SYS_getentropy, SYSTR_POLICY_PERMIT }, | ||
58 | #else | ||
59 | /* Previous releases used sysctl(3)'s kern.arnd variable. */ | ||
55 | { SYS___sysctl, SYSTR_POLICY_PERMIT }, | 60 | { SYS___sysctl, SYSTR_POLICY_PERMIT }, |
61 | #endif | ||
62 | |||
56 | { SYS_close, SYSTR_POLICY_PERMIT }, | 63 | { SYS_close, SYSTR_POLICY_PERMIT }, |
57 | { SYS_exit, SYSTR_POLICY_PERMIT }, | 64 | { SYS_exit, SYSTR_POLICY_PERMIT }, |
58 | { SYS_getpid, SYSTR_POLICY_PERMIT }, | 65 | { SYS_getpid, SYSTR_POLICY_PERMIT }, |
59 | { SYS_getentropy, SYSTR_POLICY_PERMIT }, | ||
60 | { SYS_gettimeofday, SYSTR_POLICY_PERMIT }, | 66 | { SYS_gettimeofday, SYSTR_POLICY_PERMIT }, |
61 | { SYS_clock_gettime, SYSTR_POLICY_PERMIT }, | 67 | { SYS_clock_gettime, SYSTR_POLICY_PERMIT }, |
62 | { SYS_madvise, SYSTR_POLICY_PERMIT }, | 68 | { SYS_madvise, SYSTR_POLICY_PERMIT }, |