basecamp / basecamp/hotcell

Set workers non-dumpable so a sibling cannot read `/proc/<pid>/fd`

Open
#18 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
23
Forks
0
Avg merge
11h 43m
Merged PRs (30d)
27

Description

Workers share a uid, so a compromised worker opens `/proc//fd/N` and reaches the descriptors the application passed — not only the staged files under the slot home. `docs/DESIGN.md:140-145` documents the route, and names `CAP_SETUID` and `CAP_SYS_ADMIN` as the two fixes `cap-drop ALL` removes.

`PR_SET_DUMPABLE=0` is a third one it does not name. It makes `/proc/` root-owned, which closes same-uid access to it, and it needs no capability. One `prctl` in `Supervisor#become_worker`.

To settle before doing it:

- `hotcell-server` carries no dependencies, so this needs `fiddle` from stdlib.
- Check how it sits with `verify_ptrace_scope!` (`supervisor.rb:122`), which is the other half of worker memory protection.
- A non-dumpable process writes no core dump. Decide whether an operator wants one.

Found in an adversarial review by Codex, 2026-08-19.

Contributor guide

Open the contributing guide

Research direction

Read docs/DESIGN.md:140-145 and supervisor.rb:122, then inspect Supervisor#become_worker and verify_ptrace_scope!. Determine how the proposed process protection interacts with ptrace protection and whether disabling core dumps is acceptable for operators. Done means the design decision is settled and the worker's same-UID access to sibling /proc descriptors is addressed without introducing an undeclared dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, ruby
Domain
operating-systems, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.