Run the internet-facing apps on gVisor, one at a time #39
Labels
No labels
area/backups
area/ci
area/containers
area/mail
area/minecraft
area/network
area/observability
area/tls
area/tofu
kind
bug
kind
chore
kind
feature
kind
investigation
kind
security
priority
high
priority
low
priority
medium
status/blocked
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
hutao/vps#39
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Docker here is rootful with no user-namespace remapping (
docker infolists onlyseccompandcgroupns), so uid 0 in a container is uid 0 on the host. Several internet-facing apps run that way, with docker's default capabilities and a writable root filesystem: forgejo, webmail (roundcube), kuma, navidrome, and searxng (which at least hasno-new-privileges). An RCE in any of them lands as root in a container, one kernel bug away from the host.Proposal
Register gVisor's
runscas an extra docker runtime and move those apps onto it one at a time, with--runtime=runscin each container'sextraOptions. Their syscalls then hit gVisor's user-space kernel instead of the host's.Fit, app by app
Measure
Cheaper, and worth doing either way
Drop all capabilities and add back only what each app needs, plus
no-new-privileges, on every container that does not have them. That narrows the same escape for nothing, and does not conflict with gVisor.Related: #38 (network per app).