sandlock
sandlock copied to clipboard
landlock: grants under /proc are silently dropped
When supervised, `fs_readable`/`fs_writable` entries matching `is_supervised_proc_grant` (anything under /proc) are skipped without error (landlock.rs). A grant like `/proc/self/fd/N`, used to pin a root opened with `RESOLVE_NO_SYMLINKS`, silently grants nothing.
Proposal:
- Reject such grants with a clear error instead of skipping.
- Add an fd-based grant (take an `OwnedFd`, record its resolved path for the lexical checks in COW, the unix gate and deny lists) so a root cannot be swapped for a symlink between check and confinement.