Skip to content

nan-vmd: memory/pids cgroup for the e2fsprogs sandbox #146

Open

Description

@sre-helmcode

Follow-up from the security review of helmcode/nan-vmd#72 (workspace backups, #130). The restore sandbox (internal/sandbox) is bounded only by rlimits (1024 processes x 8 GiB address space, plus memfd) and by the nan-vmd pod cgroup. A compromised e2fsprogs could exhaust the nan-vmd pod memory. Put each sandbox run in a child cgroup with memory.max and pids.max. Also: per-VM uid instead of the shared fallback JailUID for root-owned disks (RLIMIT_NPROC is per uid), drop the unused "tmp" from the probe allowlist, and bind /dev/{null,zero,urandom} read-only.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions