Skip to content

Commit

Permalink
Enable SECCOMP_FILTER_FLAG_SPEC_ALLOW per default
Browse files Browse the repository at this point in the history
We now enable the flag for the default seccomp profile.

Signed-off-by: Sascha Grunert <[email protected]>
  • Loading branch information
saschagrunert committed Feb 28, 2022
1 parent 468d7e6 commit 3cd4e02
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/seccomp/default_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ func DefaultProfile() *Seccomp {
enosys := uint(unix.ENOSYS)
eperm := uint(unix.EPERM)

flags := []string{SeccompFilterFlagSpecALlow}

syscalls := []*Syscall{
{
Names: []string{
Expand Down Expand Up @@ -882,5 +884,6 @@ func DefaultProfile() *Seccomp {
DefaultErrnoRet: &enosys,
ArchMap: arches(),
Syscalls: syscalls,
Flags: flags,
}
}
3 changes: 3 additions & 0 deletions pkg/seccomp/seccomp.json
Original file line number Diff line number Diff line change
Expand Up @@ -1037,5 +1037,8 @@
},
"excludes": {}
}
],
"flags": [
"SECCOMP_FILTER_FLAG_SPEC_ALLOW"
]
}
12 changes: 12 additions & 0 deletions pkg/seccomp/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ type Seccomp struct {
Flags []string `json:"flags,omitempty"`
}

const (
// SeccompFilterFlagLog is the filter to return actions except
// SECCOMP_RET_ALLOW should be logged. An administrator may override this
// filter flag by preventing specific actions from being logged via the
// /proc/sys/kernel/seccomp/actions_logged file. (since Linux 4.14)
SeccompFilterFlagLog = "SECCOMP_FILTER_FLAG_LOG"

// SeccompFilterFlagSpecALlow can be used to disable Speculative Store
// Bypass mitigation. (since Linux 4.17)
SeccompFilterFlagSpecALlow = "SECCOMP_FILTER_FLAG_SPEC_ALLOW"
)

// Architecture is used to represent a specific architecture
// and its sub-architectures
type Architecture struct {
Expand Down

0 comments on commit 3cd4e02

Please sign in to comment.