@@ -19,11 +19,17 @@ int main(int argc, char* argv[]) {
19
19
return EXIT_FAILURE ;
20
20
}
21
21
22
- // Block network-related syscalls
23
- seccomp_rule_add (ctx , SCMP_ACT_ERRNO (EPERM ), SCMP_SYS (socket ), 0 );
22
+ // Block relevant network-related syscalls, so as to block egress internet access
23
+
24
+ // We cannot deny these calls as they are needed by cuda
25
+ // This should not be a big deal for our use case if what we want is to block egress network access
26
+ // (just blocking connect should actually be enough)
27
+
28
+ // seccomp_rule_add(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(socket), 0);
29
+ // seccomp_rule_add(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(bind), 0);
30
+ // seccomp_rule_add(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(listen), 0);
31
+
24
32
seccomp_rule_add (ctx , SCMP_ACT_ERRNO (EPERM ), SCMP_SYS (connect ), 0 );
25
- seccomp_rule_add (ctx , SCMP_ACT_ERRNO (EPERM ), SCMP_SYS (bind ), 0 );
26
- seccomp_rule_add (ctx , SCMP_ACT_ERRNO (EPERM ), SCMP_SYS (listen ), 0 );
27
33
seccomp_rule_add (ctx , SCMP_ACT_ERRNO (EPERM ), SCMP_SYS (accept ), 0 );
28
34
seccomp_rule_add (ctx , SCMP_ACT_ERRNO (EPERM ), SCMP_SYS (send ), 0 );
29
35
seccomp_rule_add (ctx , SCMP_ACT_ERRNO (EPERM ), SCMP_SYS (sendto ), 0 );
0 commit comments