You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dc7ce02
Browse filesBrowse the repository at this point in the historyBrowse files
Brings the GHSA-cpmp-67wf-gwmx fix to main, ported onto the plan executor,
no-shell, audit and PTY harness code:
- ttyguard startup check and --allow-injectable-tty (also forwarded with
--host next to --no-shell); prompt warning line in write_request_header.
- Unprivileged leaves in run_one get setsid (no controlling terminal);
escalated leaves keep setpgid + the foreground hand-off.
- MCP launcher scrubs the launcher's terminal variables.
- New PTY test pty_injectable_tty.rs (PtyOpts gains `env`); docs incl.
testing.md.
Main's own #80 is kept: the release branch's backport (b196b68) is
superseded, and the dependency commits were already on main. Version 1.2.2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cuihtlauac ALVARADO <cuihtlauac@tarides.com>
Copy file name to clipboardExpand all lines: docs/assurance-case.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ asserted, evidence not yet produced).
66
66
|------|------|-----------|
67
67
|**C1**| Context | The Target of Evaluation is the `sudo-proxy` daemon, the `sudo-proxy-mcp` server, and the `--host` SSH-tunnel path. Out of scope: the AI model, the operator's judgement when reading the prompt. |
68
68
|**C2**| Context | Adversaries: **A1** prompt-injected MCP caller; **A2** same-UID local process (direct socket); **A3** network MITM / malicious remote. (See [security-audit.md](security-audit.md#threat-model).) |
69
-
|**A1**| Assumption |`/dev/tty` is trusted: what the daemon writes is what the human sees, and the keypress read is the human's. |
69
+
|**A1**| Assumption |`/dev/tty` is trusted: what the daemon writes is what the human sees, and the keypress read is the human's. The second half is false on a terminal other same-UID processes can type into (GHSA-cpmp-67wf-gwmx). So the daemon refuses the terminals it can recognise as such unless started with `--allow-injectable-tty`, and its unprivileged children have no controlling terminal. Residuals: [threat-model.md](threat-model.md#coverage-and-residuals) 3.5. |
70
70
|**A2**| Assumption |`sudo` (and `pkexec`) correctly enforce escalation and `env_reset`; the kernel enforces socket permissions and `SO_PEERCRED`. |
71
71
|**A3**| Assumption | The host is effectively single-user *or* the operator accepts that any same-UID process is already inside the trust boundary for non-privileged actions (finding F2). |
72
72
|**A4**| Assumption | For the SSH path, remote hosts are in `known_hosts` before first use (or `StrictHostKeyChecking=accept-new` is configured) — this gives payload confidentiality and lets the daemon reach the genuine remote; **and** the daemon authenticates to the remote by key (the remote's `authorized_keys`), which gives command authenticity at the remote. The ProVerif model ([`proofs/proverif/`](../proofs/proverif/)) makes both halves explicit and shows which guarantee rests on which. |
Copy file name to clipboardExpand all lines: docs/threat-model.md
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,7 @@ invariant at a given boundary are omitted.
74
74
| Tampering | A huge argument pushes the real command and `[y/N]` off-screen. | Displayed command length bounded with a hidden-bytes marker. | G4.3 / F3 |
75
75
| DoS | Operator never answers, leaving the gate open. | 60 s timeout, default **deny**. | G5.2 |
76
76
| Elevation | Social-engineer the human into approving. | Covered by G4; residual printable-range look-alikes accepted. | G4.4 (residual) |
77
+
| Spoofing | A same-UID process **types the answer itself**: synthetic keystrokes into the approval terminal (`tmux send-keys`, `screen -X stuff`, kitty/wezterm remote control, Konsole D-Bus, X11 XTEST, `TIOCSTI`). The typical requester (an agent) has a same-UID shell, so A1 reaches this as A2. | The daemon refuses to start in a terminal that accepts such input (`ttyguard`: multiplexer `TERM`/`$TMUX`/`$STY`/`$ZELLIJ`, remote-control emulators, VS Code, Emacs, X11 without Wayland) unless started with `--allow-injectable-tty`, which puts a warning line in every prompt. There is deliberately no `hosts.json` equivalent, since an agent can write that file and restart the daemon through MCP. Unprivileged children run in their own session, with no controlling terminal, so they cannot `TIOCSTI` into the prompt. Legacy `TIOCSTI` is reported at startup. `sudo-proxy-mcp` scrubs the launcher's terminal variables from the window it spawns. | A1 (assumption, now checked) / GHSA-cpmp-67wf-gwmx |
77
78
78
79
### B4 — daemon → exec → root (A1)
79
80
@@ -136,8 +137,12 @@ A A root command runs that the human did NOT approve
0 commit comments