Skip to content

fix(sandbox): disable child core dumps#821

Merged
johntmyers merged 1 commit intomainfrom
fix/os-75-disable-core-dumps
Apr 15, 2026
Merged

fix(sandbox): disable child core dumps#821
johntmyers merged 1 commit intomainfrom
fix/os-75-disable-core-dumps

Conversation

@johntmyers
Copy link
Copy Markdown
Collaborator

Summary

Disable core dumps for sandbox child processes in both process spawn and SSH exec flows, and document and test the new hardening.

Related Issue

Linear: OS-75

Changes

  • add shared post-fork hardening to set RLIMIT_CORE=0 on Unix and PR_SET_DUMPABLE=0 on Linux
  • apply the hardening in both ProcessHandle::spawn_impl() paths and the SSH enter_netns_and_sandbox() path before Landlock/seccomp enforcement
  • add fork-based unit coverage and an e2e regression that asserts ulimit -c is 0 inside the sandbox
  • update architecture and security documentation to reflect the startup ordering and guarantee

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Local verification:

  • cargo fmt --all
  • cargo test -p openshell-sandbox harden_child_process_disables_core_dumps --lib
  • mise run python:proto
  • mise run pre-commit on this host (z3.h missing for z3-sys)
  • mise run test on this host (z3.h missing for z3-sys)
  • mise run e2e locally (stopped; planning to rely on GitHub CI)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@johntmyers johntmyers self-assigned this Apr 13, 2026
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Apr 13, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions
Copy link
Copy Markdown

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
@johntmyers johntmyers force-pushed the fix/os-75-disable-core-dumps branch from c758d83 to 7df53c4 Compare April 13, 2026 19:17
@johntmyers johntmyers marked this pull request as ready for review April 13, 2026 19:18
@johntmyers johntmyers requested a review from a team as a code owner April 13, 2026 19:18
@johntmyers johntmyers added test:e2e Requires end-to-end coverage labels Apr 13, 2026
@johntmyers johntmyers merged commit 28db08e into main Apr 15, 2026
30 checks passed
@johntmyers johntmyers deleted the fix/os-75-disable-core-dumps branch April 15, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants