--- sandbox-seccomp-filter.c.orig +++ sandbox-seccomp-filter.c @@ -89,7 +89,12 @@ /* Load the syscall number for checking. */ BPF_STMT(BPF_LD+BPF_W+BPF_ABS, offsetof(struct seccomp_data, nr)), +#ifdef __NR_open SC_DENY(open, EACCES), +#endif +#ifdef __NR_openat + SC_DENY(openat, EACCES), +#endif SC_ALLOW(getpid), SC_ALLOW(gettimeofday), SC_ALLOW(clock_gettime), @@ -121,12 +126,16 @@ #ifdef __NR_ppoll SC_ALLOW(ppoll), #endif +#ifdef __NR_poll SC_ALLOW(poll), +#endif #ifdef __NR__newselect SC_ALLOW(_newselect), #else +#ifdef __NR_select SC_ALLOW(select), #endif +#endif SC_ALLOW(madvise), #ifdef __NR_mmap2 /* EABI ARM only has mmap2() */ SC_ALLOW(mmap2), @@ -159,7 +168,12 @@ /* Load the syscall number for checking. */ BPF_STMT(BPF_LD+BPF_W+BPF_ABS, offsetof(struct seccomp_data, nr)), +#ifdef __NR_open SC_DENY(open, EACCES), +#endif +#ifdef __NR_openat + SC_DENY(openat, EACCES), +#endif SC_ALLOW(getpid), #ifdef __NR_getrandom SC_ALLOW(getrandom), @@ -184,11 +198,15 @@ #ifdef __NR_ppoll SC_ALLOW(ppoll), #endif +#ifdef __NR_poll SC_ALLOW(poll), +#endif #ifdef __NR__newselect SC_ALLOW(_newselect), #else +#ifdef __NR_select SC_ALLOW(select), +#endif #endif SC_ALLOW(madvise), #ifdef __NR_mmap2 /* EABI ARM only has mmap2() */