Skip to content

Commit

Permalink
Disable gVisor's DirectFS feature.
Browse files Browse the repository at this point in the history
DirectFS is enabled by default in gVisor to improve I/O performance,
but comes at the cost of enabling the `openat(2)` syscall (with severe
restrictions, but still). As Dangerzone is not performance-sensitive,
and that it is desirable to guarantee for the document conversion
process to not open any files (to mimic some of what SELinux provides),
might as well disable it by default.

See #226.
  • Loading branch information
EtiennePerot committed Aug 10, 2024
1 parent f739761 commit 72e1704
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dangerzone/gvisor_wrapper/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ def log(message: str, *values: typing.Any) -> None:
"--rootless=true",
"--network=none",
"--root=/home/dangerzone/.containers",
# Disable DirectFS for to make the seccomp filter even stricter,
# at some performance cost.
"--directfs=false",
]
if os.environ.get("RUNSC_DEBUG"):
runsc_argv += ["--debug=true", "--alsologtostderr=true"]
Expand Down

0 comments on commit 72e1704

Please sign in to comment.