diff --git a/profiles/seccomp/default.json b/profiles/seccomp/default.json index 2f14e58257..bd06fa45b1 100644 --- a/profiles/seccomp/default.json +++ b/profiles/seccomp/default.json @@ -553,6 +553,7 @@ "names": [ "bpf", "clone", + "clone3", "fanotify_init", "fsconfig", "fsmount", @@ -627,6 +628,18 @@ ] } }, + { + "names": [ + "clone3" + ], + "action": "SCMP_ACT_ERRNO", + "errnoRet": 38, + "excludes": { + "caps": [ + "CAP_SYS_ADMIN" + ] + } + }, { "names": [ "reboot" diff --git a/profiles/seccomp/default_linux.go b/profiles/seccomp/default_linux.go index 5fa5fe59d2..ad33d62a24 100644 --- a/profiles/seccomp/default_linux.go +++ b/profiles/seccomp/default_linux.go @@ -42,6 +42,7 @@ func arches() []Architecture { // DefaultProfile defines the allowed syscalls for the default seccomp profile. func DefaultProfile() *Seccomp { + nosys := uint(unix.ENOSYS) syscalls := []*Syscall{ { LinuxSyscall: specs.LinuxSyscall{ @@ -546,6 +547,7 @@ func DefaultProfile() *Seccomp { Names: []string{ "bpf", "clone", + "clone3", "fanotify_init", "fsconfig", "fsmount", @@ -615,6 +617,18 @@ func DefaultProfile() *Seccomp { Caps: []string{"CAP_SYS_ADMIN"}, }, }, + { + LinuxSyscall: specs.LinuxSyscall{ + Names: []string{ + "clone3", + }, + Action: specs.ActErrno, + ErrnoRet: &nosys, + }, + Excludes: &Filter{ + Caps: []string{"CAP_SYS_ADMIN"}, + }, + }, { LinuxSyscall: specs.LinuxSyscall{ Names: []string{