Skip to content

bug(sandbox): namespace hardening prevents Chromium's guest sandbox from starting #4098

Open

Description

@SidShaytay

User Story

I use OpenShell v0.1.2 on Fedora 44 Silverblue for coding agents in rootless Podman containers and microVMs. I want agents to test project apps with Chromium inside the guest, keeping Chromium's own sandbox and OpenShell's filesystem/network confinement enabled.

Problem Statement

Chromium cannot establish its namespace sandbox under the current workload restrictions. In disposable OpenShell guests, unshare -Ur fails with Operation not permitted in both runtimes. Sandbox-enabled browser startup also failed; the microVM diagnostic was summarized as "No usable sandbox" in our investigation notes, but that browser stderr was not retained as a raw log.

The v0.1.2 source blocks CLONE_NEWUSER through clone/unshare. The child-hardening filter additionally denies unshare, namespace-bearing clone, setns, chroot, and credential-changing operations. These are deliberate hardening rules; this report requests a supported compatibility path, not blanket removal of those protections.

Impact / Why This Matters

Guest browser testing is blocked unless users disable browser sandbox protections or introduce a separate browser boundary with additional state management and network enforcement. We want to preserve defense in depth and keep browser traffic governed by OpenShell.

Acceptance Criteria

  • A documented, supported guest-browser workflow starts Chromium with its own namespace and seccomp sandbox layers enabled, verified through chrome://sandbox.
  • OpenShell filesystem restrictions, destination policy, supervisor protection, capability limits and no_new_privs remain enforced.
  • Regression tests cover the supported container and microVM paths, including attempts to escape the intended boundary.
  • Unsupported runtime combinations fail clearly; no automatic fallback to --no-sandbox.

Reproduction Steps

In an existing OpenShell v0.1.2 sandbox with util-linux already present:

openshell --gateway podman sandbox exec --name <sandbox-name> -- unshare -Ur true
openshell --gateway vm sandbox exec --name <sandbox-name> -- unshare -Ur true

Both return unshare: unshare failed: Operation not permitted. These probes demonstrate the namespace restriction, not a complete browser reproduction. Our browser image has pinned Playwright CLI 0.1.22 and its matching Chromium, with chromiumSandbox:true. Launching sandbox-enabled Chromium in either OpenShell runtime failed; a separate network-disabled rootless Podman test of the same image succeeded with Chromium's namespace and seccomp protections enabled.

Environment

  • OpenShell: v0.1.2
  • Host: Fedora 44 Silverblue, Linux x86_64
  • OpenShell runtimes tested: rootless Podman and microVM
  • Guest image: Ubuntu 24.04-based; Playwright CLI 0.1.22; Chromium revision 1247

Logs

Saved test output excerpts, 2026-10-01 (host paths and unrelated tool output omitted):

Runtime: podman
Session: osh-browser-6a97d3
Created sandbox: osh-browser-6a97d3
{"browser":{"browserName":"chromium","launchOptions":{"executablePath":"/opt/playwright-browsers/chromium-1247/chrome-linux64/chrome","chromiumSandbox":true,"args":["--disable-dev-shm-usage"]}}}
unshare: unshare failed: Operation not permitted

Runtime: vm
Session: osh-browser-14ed04
Created sandbox: osh-browser-14ed04
{"browser":{"browserName":"chromium","launchOptions":{"executablePath":"/opt/playwright-browsers/chromium-1247/chrome-linux64/chrome","chromiumSandbox":true,"args":["--disable-dev-shm-usage"]}}}
unshare: unshare failed: Operation not permitted

Related Issues

#5467 (replacement for stale-closed #4097) covers the separate seccomp(SECCOMP_SET_MODE_FILTER) restriction. This is not a blanket ban on additional filters: our investigation recorded successful stacking through prctl(PR_SET_SECCOMP).

#1039 covers desktop/browser harnesses broadly and was closed as completed. We could not find a closing implementation reference demonstrating this particular guest Chromium workflow. #982 concerns outer Kubernetes user namespaces and explicitly retains the nested CLONE_NEWUSER block; it does not resolve this case.

Companion issue status — 2026-11-10

The active seccomp-stacking companion is now #5467, replacing stale-closed #4097. Reopening #4097 was rejected by the API; the replacement includes source revalidation against v0.1.8.

The concerns remain separate: this issue covers namespaces, while #5467 covers supported restrictive filter installation without interfering with OpenShell's notification mediation. Chromium may use prctl for filter stacking, so fixing the seccomp syscall restriction alone is not proof of browser compatibility. An in-workload solution needs end-to-end validation of namespace and filter behavior; a separate browser execution boundary may avoid changing these restrictions in the agent workload.

Activity

  1. removed
    state:triage-neededOpened without agent diagnostics and needs triage
    on Oct 5, 2026
  2. self-assigned this
    on Oct 5, 2026
  3. added
    state:acceptedA maintainer decided OpenShell should pursue this issue
    on Oct 5, 2026
  4. SidShaytay commented on Oct 5, 2026

    @SidShaytay
    Author

    @aetherxeg-source : Your AI generated self-promotion spam fails to masquerade as a useful comment. Please delete the useless comment and link.

  5. sandys commented on Oct 6, 2026

    @sandys

    @SidShaytay do u have a workaround for this ? we are wondering if playwright infra should run outside of openshell ? not very nice...but dont see an alternative.

  6. SidShaytay commented on Oct 7, 2026

    @SidShaytay
    Author

    @sandys - Yes but the workarounds are ugly at the moment.

    1. Disable browser sandboxing. Takes browser safety back several years. This opens the microVM to exfil of data, code, documents etc. Your openshell proxy allowlist becomes your only defense; it's fragile.

    2. Relocate browser in another real VM, agent workloads in microVMs and routing CDP between them. This is also brittle.

    TBH, I'm not using openshell due to these issue and because the microVM runtime doesn't support virtioFS (live mirroring of projects/repo/folders with host/outside FS). It's a bit fragile (for me at the moment), I'll check in next month if these have been fixed. Long running agentic workflows really need very predictable yet lightweight guardrails.

  7. sandys commented on Oct 7, 2026

    @sandys
  8. sunilteja93 commented on Oct 21, 2026

    @sunilteja93
    Contributor

    Hi @drew, I noticed you're assigned to this issue. Are you planning to work on it? If not, I'd be happy to take on the full implementation, including the regression tests. Let me know if you're okay with me picking it up. Thanks!

  9. drew commented on Oct 21, 2026

    @drew
    Collaborator

    Hi @sunilteja93 yes, please feel free to pick up the work. I'll assign you the ticket and am happy to review your PR.

  10. sunilteja93 commented on Oct 21, 2026

    @sunilteja93
    Contributor

    Thanks @drew! I'll take this on and keep you posted once I have a PR ready for review.

  11. sunilteja93 commented on Oct 21, 2026

    @sunilteja93
    Contributor

    RFC: Security-Preserving Chromium Browser Isolation for OpenShell

    Issue: NVIDIA/OpenShell #4098
    Status: Proposed architecture, requesting maintainer approval

    Problem

    Chromium's native Linux sandbox cannot initialize under OpenShell's current workload restrictions. The relevant controls are intentional security protections, not defects to remove.

    I reproduced the issue in a rootless Podman E2E environment on Linux aarch64. The diagnostic results show:

    • User namespace creation and cloning can work in an experimental opt-in configuration.
    • UID/GID mapping succeeds only when the diagnostic filesystem policy permits the necessary /proc writes.
    • Mount namespace creation (CLONE_NEWNS) remains blocked with EPERM.
    • Chromium still fails with No usable sandbox!.

    The experimental opt-in configuration is not proposed for production because it changes existing workload security restrictions. And compromising on security is a big no no.

    Proposed Approach

    Introduce an isolated browser execution boundary managed by OpenShell, separate from the existing agent workload.

    The agent would interact with Chromium through an authenticated browser-control channel, potentially CDP. Chromium would retain its native sandbox, while the agent's existing seccomp and Landlock enforcement would remain unchanged.

    For Podman, this could be a separately managed browser container. For the microVM runtime, an independently isolated browser VM may be necessary. These are candidate implementations, not yet validated designs.

    Required Security Guarantees

    1. No weakening of existing workload protections: Preserve seccomp, Landlock, capabilities, no_new_privs, supervisor isolation, and existing namespace restrictions.
    2. No network-policy bypass: Browser traffic must be governed by OpenShell's destination policy. Direct egress, DNS bypasses, and unauthorized local-network access must remain blocked.
    3. Strict browser isolation: No supervisor credentials, implicit access to agent files, privileged mounts, or shared sensitive state.
    4. Authenticated control: Browser-control access must be bound to an authorized sandbox session and must not expose an unauthenticated CDP endpoint.
    5. Fail closed: Unsupported runtimes, policy failures, or unavailable enforcement must never trigger --no-sandbox or unconfined execution.

    Validation Plan

    Implement targeted E2E coverage for Podman and microVM runtimes, including Chromium native sandbox verification through chrome://sandbox, denied network destinations, direct-egress bypass attempts, unauthorized browser-control access, filesystem isolation, and supervisor credential protection.

    Success requires both browser functionality and demonstrable preservation of OpenShell's security guarantees.

    Architectural Decision Requested

    The current issue calls for a supported in-guest Chromium workflow. A separate browser boundary may change that deployment model, so I would like maintainer confirmation before implementation.

    @drew, would you be comfortable with this architecture as the direction for #4098?

    Specifically, could you confirm:

    • Whether a separately isolated, OpenShell-managed browser boundary satisfies the issue's intended scope.
    • Whether the proposed direction is acceptable for both Podman and microVM runtimes.
    • Whether you would prefer an initial design PR or a smaller proof of concept before the full implementation.

    I can proceed with the implementation and security regression tests once we align on the architectural direction.

  12. sunilteja93 commented on Oct 27, 2026

    @sunilteja93
    Contributor

    Hey @drew ! following up on the above proposed architecture.

    I’ve completed the initial reproduction and diagnostics, and the key consideration is preserving OpenShell’s existing security boundaries while enabling Chromium’s native sandbox.

    Before proceeding with implementation, I’d appreciate your thoughts on whether the isolated browser boundary approach aligns with the project’s direction, or if you’d prefer a different approach.

    Happy to put together a small poc for review once we’re aligned. Thanks!

  13. sunilteja93 commented on Nov 11, 2026

    @sunilteja93
    Contributor

    Hey @drew, hope you’re doing well!

    Just wanted to check in on the proposed approach for #4098 whenever you get a chance. I’m still interested in taking this forward and would love to hear your thoughts before proceeding with the implementation.

    No rush at all. I appreciate your time and guidance. Thanks!

  14. added
    area:runtimeSandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle.
    topic:policyPolicy authoring, validation, proving, distribution, enforcement, ergonomics, and hardening.
    topic:securityVulnerability management, security analysis/auditing, bypass detection, and abuse prevention.
    topic:testingUnit, integration, regression, conformance, E2E tests, coverage, flakes, and test infrastructure.
    meta:labeler-checkpointTemporary label used by /label-issue to record a verified classification checkpoint.
    and removed
    topic:testingUnit, integration, regression, conformance, E2E tests, coverage, flakes, and test infrastructure.
    meta:labeler-checkpointTemporary label used by /label-issue to record a verified classification checkpoint.
    on Nov 15, 2026
  15. TyceHerrman commented on Nov 18, 2026

    @TyceHerrman

    Codex is affected by the same restriction. Its Linux filesystem sandbox requires Bubblewrap, which cannot create namespaces inside an OpenShell workload.

    would love to see support for other nested-sandbox consumers alongside Chromium. that could be split out into another issue too

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

Metadata

Metadata

Labels

area:runtimeSandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle.state:acceptedA maintainer decided OpenShell should pursue this issuetopic:policyPolicy authoring, validation, proving, distribution, enforcement, ergonomics, and hardening.topic:securityVulnerability management, security analysis/auditing, bypass detection, and abuse prevention.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions