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
[Bug]: A control frame with no id kills the terminal daemon and every terminal on the host #17841
Operating system: Linux (observed on Synology DSM; the code path has no platform branch) Orca version: built from main at 94e758666 — between v1.4.191 and v1.4.192
One control frame whose id is missing or not a string takes the terminal daemon
down, and every terminal on the host with it — the process deliberately kept alive
so terminals outlive the runtime, the supervisor and an update.
DaemonServer.handleRequest reads request.id one line above the try/catch that
is already there:
constisNotify=request.id.startsWith(NOTIFY_PREFIX)// outside the trytry{ ... }
That throws a TypeError, escapes as an unhandled rejection, reaches the daemon's uncaughtException handler, and is rethrown because it is not a native PTY error.
Repro:
Connect to the daemon's control socket.
Write one NDJSON line that is valid JSON with no usable id — {}, null, or {"id": 123}.
The daemon exits. Every terminal on the host dies with it.
Three places independently allow it: the NDJSON boundary
(createNdjsonParser hands through any parsed JSON, null included, and the
callback asserts as DaemonRequest over it), the dispatch site
(void this.handleRequest(...) lets any rejection escape), and the id read
itself.
An unknown method is fine and already gets an error reply — that path was never
the problem. Only an unroutable frame is fatal, and it cannot be replied to anyway
since correlation needs the id it did not carry.
Update: there is a second, unauthenticated variant of this, found while reviewing the fix. Worth recording here because it changes the severity of the issue as filed.
The same unchecked cast sits one frame earlier, on the hello handler in daemon-client-connections.ts:
JSON.parse('null') is a valid frame, so message can be null and the .type read throws.
Two things make it worse than the control-frame case in the original report:
The throw is synchronous, so it is an uncaught exception rather than a rejection.createNdjsonParser invokes onRecordoutside the try that wraps JSON.parse (src/shared/main-process-ndjson-framer.ts), so it propagates straight out of the socket's data handler.
It runs before the token comparison. No credentials are required — socket reachability is the only precondition.
So on the original report's reproduction, null as the first frame kills the daemon without authenticating at all. Both paths are fixed in #17848.
Activity
klaidliadon commentedon Sep 1, 2026
Update: there is a second, unauthenticated variant of this, found while reviewing the fix. Worth recording here because it changes the severity of the issue as filed.
The same unchecked cast sits one frame earlier, on the hello handler in
daemon-client-connections.ts:JSON.parse('null')is a valid frame, somessagecan benulland the.typeread throws.Two things make it worse than the control-frame case in the original report:
createNdjsonParserinvokesonRecordoutside thetrythat wrapsJSON.parse(src/shared/main-process-ndjson-framer.ts), so it propagates straight out of the socket'sdatahandler.So on the original report's reproduction,
nullas the first frame kills the daemon without authenticating at all. Both paths are fixed in #17848.fix(daemon): clean launch env, validate client frames, fit the socket…
Phase 3.5: fix the top SSH/remote issues at the root cause (#26483)