google / google/gvisor

support guest Landlock syscalls for in-sandbox application sandboxing

Open
#13,439 11 comments 17 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Go
Stars
19.3k
Forks
2k
Avg merge
3d 5h
Merged PRs (30d)
264

Description

### Description

gVisor currently does not expose the Linux Landlock ABI. Tools such as [nono](https://github.com/always-further/nono) and openai [codex](https://github.com/openai/codex) use Landlock as an unprivileged, inherited, kernel-enforced sandbox for filesystem, networking, and process/IPC scoping. When run inside a gVisor container, these tools cannot apply their expected sandbox policy.

As one of the maintainers of nono, I have had a good few users asking about gVisor support and it makes sense why - they compose really well together with the strong isolation model of gvisor and nono's capability based policy model.

### Is this feature related to a specific bug?

Its a feature request.

### Do you have a specific solution in mind?

current gVisor syscall tables do not register:

- `landlock_create_ruleset`
- `landlock_add_rule`
- `landlock_restrict_self`

So Applications probing Landlock observe it as unavailable.

An incremental path (if prefered) could be the following as we walk up the ABI versions, or even better include support for all - but we need to consider managing older kernels
1. Landlock V3 filesystem enforcement.
2. Landlock V4 TCP port enforcement.
3. Landlock V5/V6 device ioctl and scoping.
4. Landlock ABI 7 (audit)

cc @EtiennePerot and @l0kod

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.