File tree Expand file tree Collapse file tree 2 files changed +36
-3
lines changed
Expand file tree Collapse file tree 2 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -183,9 +183,6 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
183183 "ioprio_set" ,
184184 "io_setup" ,
185185 "io_submit" ,
186- "io_uring_enter" ,
187- "io_uring_register" ,
188- "io_uring_setup" ,
189186 "ipc" ,
190187 "kill" ,
191188 "landlock_add_rule" ,
Original file line number Diff line number Diff line change 1+ package seccomp
2+
3+ import (
4+ "testing"
5+
6+ "github.com/opencontainers/runtime-spec/specs-go"
7+ )
8+
9+ func TestIOUringIsNotAllowed (t * testing.T ) {
10+
11+ disallowed := map [string ]bool {
12+ "io_uring_enter" : true ,
13+ "io_uring_register" : true ,
14+ "io_uring_setup" : true ,
15+ }
16+
17+ got := DefaultProfile (& specs.Spec {
18+ Process : & specs.Process {
19+ Capabilities : & specs.LinuxCapabilities {
20+ Bounding : []string {},
21+ },
22+ },
23+ })
24+
25+ for _ , config := range got .Syscalls {
26+ if config .Action != specs .ActAllow {
27+ continue
28+ }
29+
30+ for _ , name := range config .Names {
31+ if disallowed [name ] {
32+ t .Errorf ("found disallowed io_uring related syscalls" )
33+ }
34+ }
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments