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 freedomofpress#226.
  • Loading branch information
EtiennePerot authored and apyrgio committed Sep 10, 2024
1 parent 2237f76 commit 73b0f8b
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 73b0f8b

Please sign in to comment.