sandlock icon indicating copy to clipboard operation
sandlock copied to clipboard

landlock: grants under /proc are silently dropped

Open congwang-mk opened this issue 1 month ago • 0 comments

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.

congwang-mk avatar Oct 23 '26 04:10 congwang-mk