Commit 04a0969
Roy Lin
feat(box): CRI applies RuntimeDefault seccomp filter to containers
A container whose SecurityContext requests seccomp RuntimeDefault now gets
the default BPF filter installed in its child before execve
(A3S_SEC_SECCOMP=default → guest-init configure_child_process →
namespace::apply_default_seccomp, applied last, after chroot + privilege
drop). The filter blocks the dangerous syscalls Docker's default profile
blocks and puts the process in SECCOMP_MODE_FILTER (Seccomp: 2).
Unconfined / unset containers stay unfiltered (Seccomp: 0).
Verified on the KVM server: the CRI "should support seccomp default on the
container" conformance spec now passes (SeccompProfilePath bucket 4 -> 5).
The localhost-profile specs (incl. the SYS_ADMIN sethostname block) remain
— they need the host profile file plumbed into the VM, a separate effort.
Also fixes a clippy while-let lint in the sysctls boot-env loop.1 parent e27d17e commit 04a0969
4 files changed
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
812 | 821 | | |
813 | 822 | | |
814 | 823 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
464 | 471 | | |
465 | 472 | | |
466 | 473 | | |
467 | 474 | | |
468 | 475 | | |
469 | 476 | | |
| 477 | + | |
470 | 478 | | |
471 | 479 | | |
472 | 480 | | |
| |||
831 | 839 | | |
832 | 840 | | |
833 | 841 | | |
| 842 | + | |
834 | 843 | | |
835 | 844 | | |
836 | 845 | | |
| |||
866 | 875 | | |
867 | 876 | | |
868 | 877 | | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
869 | 887 | | |
870 | 888 | | |
871 | 889 | | |
| |||
878 | 896 | | |
879 | 897 | | |
880 | 898 | | |
| 899 | + | |
881 | 900 | | |
882 | 901 | | |
883 | 902 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 23 | + | |
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | | - | |
| 500 | + | |
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
| |||
0 commit comments