Skip to content

[SECURITY] No process limit (ulimit -u unlimited) — fork bomb unprotected #809

Closed

Description

@cluster2600

Summary

The sandbox user has ulimit -u unlimited, meaning there is no protection against fork bombs or process exhaustion attacks. A prompt-injected agent could DoS the host by spawning processes until the system runs out of resources.

Reproduction

$ ulimit -u
unlimited
$ ulimit -n
1024

File descriptor limit is set (1024) but process limit is unbounded.

Impact

A simple :(){ :|:& };: or while true; do sleep 1 & done from inside the sandbox would exhaust host PID space and potentially crash the entire system, including the OpenShell gateway and other sandboxes.

Recommendation

Set a reasonable process limit via the container runtime (e.g. --pids-limit 256 in Docker, or a pids cgroup limit). This is a one-line fix in the sandbox container spec.

Environment

  • openshell 0.0.14
  • Base sandbox image: ghcr.io/nvidia/openshell-community/sandboxes/base:latest
  • DGX Spark (aarch64)

Activity

  1. cluster2600 commented on Mar 24, 2026

    @cluster2600
    ContributorAuthor

    Related: #796 proposes a command pattern denylist that would provide application-level coverage for this class of issue. Worth addressing together — the image hardening here is the defence-in-depth layer (remove the tool entirely), whilst #796 catches the patterns even if the tool is present via a different path.

  2. BenediktSchackenberg commented on Mar 24, 2026

    @BenediktSchackenberg
    Contributor

    Addressed in #830 — added ulimit -u 512 in both the ENTRYPOINT and start script to cap process count.

  3. BenediktSchackenberg commented on Mar 26, 2026

    @BenediktSchackenberg
    Contributor

    Fixed via #830 (merged). Process limit enforced: ulimit -u 512 is set in both the ENTRYPOINT and the start script, preventing fork bombs and process exhaustion.

  4. cluster2600 commented on Mar 26, 2026

    @cluster2600
    ContributorAuthor

    thanks!

  5. added theissue type on Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions