Skip to content

seccomp groups (next round) #3106

@rusty-snake

Description

@rusty-snake

I was playing with the seccomp filter of my tor-browser setup (https://github.com/rusty-snake/firejailed-tor-browser) and noticed a few things.

  1. All syscall from @mount are in @default.

@mount=chroot,mount,pivot_root,umount,umount2

@default=@clock,@cpu-emulation,@debug,@module,@obsolete,@raw-io,@reboot,@swap,open_by_handle_at,name_to_handle_at,ioprio_set,ni_syscall,syslog,fanotify_init,kcmp,add_key,request_key,mbind,migrate_pages,move_pages,keyctl,io_setup,io_destroy,io_getevents,io_submit,io_cancel,remap_file_pages,set_mempolicyvmsplice,umount,userfaultfd,acct,bpf,chroot,mount,nfsservctl,pivot_root,setdomainname,sethostname,umount2,vhangup

  1. @aio is in @default, except io_pgetevents.

@aio=io_cancel,io_destroy,io_getevents,io_pgetevents,io_setup,io_submit

Line one: @aio syscalls in @default.
Line two: @aio.

io_cancel,io_destroy,io_getevents,              io_setup,io_submit
io_cancel,io_destroy,io_getevents,io_pgetevents,io_setup,io_submit
  1. @sysem-service should not be used. Why? Let my explain.
    @sysem-service is a group for seccomp.keep and not for seccomp.drop, therefore it is a whitelisting group (as in systemd).
    @default is a blacklisting only group for seccomp.drop. It includes @obsolete.
    @sysem-service includes @default and therefore also @obsolete, since @sysem-service has so much syscalls that it hardly never will be used for seccomp.drop. It will be used for seccomp.keep, but it includes @obsolete which should never be whitelisted except a program needs all the syscalls from there.

+---------------+
| @default-keep |
| @mount |
+---------------+
+----------------+ +---------+ +--------+ +--------------+
| @cpu-emulation | | @clock | | @chown | | @aio |
| @debug | | @module | +--------+ | @basic-io |
| @obsolete | | @raw-io | : : | @file-system |
+----------------+ | @reboot | : : | @io-event |
: | @swap | : : | @ipc |
: +---------+ : : | @keyring |
: : : : : | @memlock |
: ..............: : : : | @network-io |
: : : ........: : | @process |
: : : : : | @resources |
+----------+ +-------------+ : | @setuid |
| @default | | @privileged | : | @signal |
+----------+ +-------------+ : | @sync |
: : : | @timer |
: :........................... : +--------------+
: : : :
+----------------------+ +-----------------+
| @default-nodebuggers | | @system-service |
+----------------------+ +-----------------+

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions