Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux: Seccomp profile for swtpm #115

Closed
stefanberger opened this issue Mar 13, 2019 · 1 comment
Closed

Linux: Seccomp profile for swtpm #115

stefanberger opened this issue Mar 13, 2019 · 1 comment
Assignees

Comments

@stefanberger
Copy link
Owner

stefanberger commented Mar 13, 2019

On Linux (only), enable a seccomp profile for preventing syscalls before entering the main processing loop. Currently the following syscalls are used by swtpm:

  • exit (at shutdown)
  • open (in loop, at shutdown)
  • close (in loop, at shutdown)
  • read (in loop)
  • write (in loop)
  • pipe (at setup)
  • poll (in loop)
  • accept (in loop)
  • fstat (at setup)
  • ioctl (at setup)
  • signal (at setup)
  • setuid (at setup)
  • setgid (at setup)

Those syscalls marked with 'in loop' or 'at shutdown' need to be allowed.

The seccomp profile would be enabled by default and --with-seccomp would be the implicit default to build the project with and --without-seccomp would disable it.

Additional command line parameters could be:

--seccomp action=none      ; turn off seccomp profile
--seccomp action=kill      ; default behavior
--seccomp action=log       ; log the syscall 

swtpm could be started by a process that itself runs a seccomp profile and that swtpm inherits and for that reason may not be able to set its seccomp profile. To handle this case seccomp action=none should be used.

@stefanberger
Copy link
Owner Author

PR #117 resolves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant