]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Deny socketcall in seccomp filter on ppc64le.
authorDarren Tucker <dtucker@zip.com.au>
Mon, 24 Apr 2017 09:40:31 +0000 (19:40 +1000)
committerDarren Tucker <dtucker@zip.com.au>
Mon, 24 Apr 2017 09:40:31 +0000 (19:40 +1000)
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.

sandbox-seccomp-filter.c

index 2831e9d1083c86cbfdbc1a2a1946150863cbede5..200932a8c9edf9a495acc5b366212d0ce60bcadd 100644 (file)
@@ -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 */