summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2020-04-10 15:46:16 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-10 15:47:23 -0700
commit96f914295920404e7c5c97553771e09b31f6900a (patch)
tree02738d88b3be86d6ab8acbdaa0811dbd182eef08 /runsc/boot
parentca868e3e384fb1dabec4fd27ff3627f61a3bd54d (diff)
Use O_CLOEXEC when dup'ing FDs
The sentry doesn't allow execve, but it's a good defense in-depth measure. PiperOrigin-RevId: 305958737
Diffstat (limited to 'runsc/boot')
-rw-r--r--runsc/boot/filter/config.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/runsc/boot/filter/config.go b/runsc/boot/filter/config.go
index 06b9f888a..1828d116a 100644
--- a/runsc/boot/filter/config.go
+++ b/runsc/boot/filter/config.go
@@ -44,7 +44,7 @@ var allowedSyscalls = seccomp.SyscallRules{
{
seccomp.AllowAny{},
seccomp.AllowAny{},
- seccomp.AllowValue(0),
+ seccomp.AllowValue(syscall.O_CLOEXEC),
},
},
syscall.SYS_EPOLL_CREATE1: {},