Skip to content

Commit 87fc693

Browse files
jleboncgwalters
authored andcommitted
mantle/qemu: neuter virtiofsd seccomp filtering
By default, `virtiofsd` uses seccomp to allow only some syscalls to be proxied from the guest. In the theme of `--sandbox=none`, let's also neuter seccomp filtering for our virtiofs usage; the workloads we run in the supermin/dev VMs are trusted. Incidentally, this avoids issues like #3635, where some syscalls were accidentally missing from the allow list. In this case, new libostree code[[1]] running in the supermin VM when building the legacy oscontainer calls out to `fstatfs` over virtiofs, which maps to the blocked `fstatfs64` syscall on ppc64le. (I've opened an upstream patch[[2]] to fix this, but we don't strictly need it.) Closes: #3635 [1]: ostreedev/ostree@ba9c9de [2]: https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/200
1 parent 19a49f0 commit 87fc693

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mantle/platform/qemu.go

+3
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,9 @@ func createVirtiofsCmd(directory, socketPath string) exec.Cmd {
15941594
if os.Getuid() == 0 {
15951595
args = append(args, "--modcaps=-mknod:-setfcap")
15961596
}
1597+
// We don't need seccomp filtering; we trust our workloads. This incidentally
1598+
// works around issues like https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/200.
1599+
args = append(args, "--seccomp=none")
15971600
cmd := exec.Command("/usr/libexec/virtiofsd", args...)
15981601
// This sets things up so that the `.` we passed in the arguments is the target directory
15991602
cmd.Dir = directory

0 commit comments

Comments
 (0)