summaryrefslogtreecommitdiffstats
path: root/sandbox-seccomp-filter.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2017-04-24 19:40:31 +1000
committerDarren Tucker <dtucker@zip.com.au>2017-04-24 19:44:05 +1000
commit295ac5e15397e703c5f49d25954f5db91e05a9ce (patch)
tree174302ee73848610dc028a3ef86b3f7eb184267e /sandbox-seccomp-filter.c
parentf77e6b521651c08864e6852fdc5624f75026fbe7 (diff)
Deny socketcall in seccomp filter on ppc64le.
OpenSSL is using socket() calls (in FIPS mode) when handling ECDSA keys in privsep child. The socket() syscall is already denied in the seccomp filter, but in ppc64le kernel, it is implemented using socketcall() syscall, which is not denied yet (only SYS_SHUTDOWN is allowed) and therefore fails hard. Patch from jjelen at redhat.com.
Diffstat (limited to 'sandbox-seccomp-filter.c')
-rw-r--r--sandbox-seccomp-filter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
index 2831e9d1..200932a8 100644
--- a/sandbox-seccomp-filter.c
+++ b/sandbox-seccomp-filter.c
@@ -225,6 +225,7 @@ static const struct sock_filter preauth_insns[] = {
#endif
#ifdef __NR_socketcall
SC_ALLOW_ARG(__NR_socketcall, 0, SYS_SHUTDOWN),
+ SC_DENY(__NR_ssocketcall, EACCES),
#endif
#if defined(__NR_ioctl) && defined(__s390__)
/* Allow ioctls for ICA crypto card on s390 */