summaryrefslogtreecommitdiffstats
path: root/sandbox-seccomp-filter.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2016-05-20 01:56:53 +0200
committerDamien Miller <djm@mindrot.org>2016-05-20 01:56:53 +0200
commitf64062b1f74ad5ee20a8a49aab2732efd0f7ce30 (patch)
tree1b842e4810e86495a65474a9a54070e50ae92952 /sandbox-seccomp-filter.c
parentupstream commit (diff)
downloadopenssh-f64062b1f74ad5ee20a8a49aab2732efd0f7ce30.tar.xz
openssh-f64062b1f74ad5ee20a8a49aab2732efd0f7ce30.zip
Deny lstat syscalls in seccomp sandbox
Avoids sandbox violations for some krb/gssapi libraries.
Diffstat (limited to 'sandbox-seccomp-filter.c')
-rw-r--r--sandbox-seccomp-filter.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
index d132e2646..2e1ed2c52 100644
--- a/sandbox-seccomp-filter.c
+++ b/sandbox-seccomp-filter.c
@@ -103,6 +103,12 @@ static const struct sock_filter preauth_insns[] = {
offsetof(struct seccomp_data, nr)),
/* Syscalls to non-fatally deny */
+#ifdef __NR_lstat
+ SC_DENY(lstat, EACCES),
+#endif
+#ifdef __NR_lstat64
+ SC_DENY(lstat64, EACCES),
+#endif
#ifdef __NR_fstat
SC_DENY(fstat, EACCES),
#endif