Skip to content

Commit

Permalink
Update the default seccomp to block socket calls to AF_VSOCK
Browse files Browse the repository at this point in the history
Signed-off-by: Zhuchen Wang <zcwang@google.com>
  • Loading branch information
zhuchenwang committed Oct 11, 2022
1 parent 32aa33a commit 17a9324
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion contrib/seccomp/seccomp_default.go
Expand Up @@ -357,7 +357,6 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
"signalfd4",
"sigprocmask",
"sigreturn",
"socket",
"socketcall",
"socketpair",
"splice",
Expand Down Expand Up @@ -411,6 +410,17 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
Action: specs.ActAllow,
Args: []specs.LinuxSeccompArg{},
},
{
Names: []string{"socket"},
Action: specs.ActAllow,
Args: []specs.LinuxSeccompArg{
{
Index: 0,
Value: unix.AF_VSOCK,
Op: specs.OpNotEqual,
},
},
},
{
Names: []string{"personality"},
Action: specs.ActAllow,
Expand Down

0 comments on commit 17a9324

Please sign in to comment.