Repository navigation
fix(desktop): finish VncAuth before readiness probes close - #193487
Conversation
Host desktop status, acquire, and managed Linux readiness closed the RFB socket after reading the security offer. TigerVNC treats that half-handshake as a failed client and blacklists 127.0.0.1, so the later desktop stream dies with an unsupported-security error. When a password is available, the same socket now selects VncAuth, checks the security result, and reads ServerInit before it closes. A wrong password is reported once instead of being dropped early. A missing password file still classifies the offer, because there is no credential that can finish the handshake. Signed-off-by: Sebastien Tardif <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
✅ Maintainer security changes approvedA maintainer approved this revision with an explicit security approval comment.
A later push requires a fresh approval comment for an external contributor's PR. |
The VncAuth response helper stays in the probe. rfb-preauth already imports that module, so sharing the helper from the auth file would cycle. Readiness does not change Gateway authentication. Signed-off-by: Sebastien Tardif <[email protected]>
|
Codex review: blocked before merge. What this changesThis PR completes configured VNC authentication and desktop initialization before readiness probes disconnect. Example: Repeated Host Desktop status requests target password-protected TigerVNC on 127.0.0.1:5901.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this PR: it fixes a confirmed Host Desktop failure still present on main, and the prior recovery-guidance finding is resolved. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherGateway status, Host Desktop acquisition, and managed Linux startup use the RFB probe to turn loopback server responses and existing credentials into desktop readiness results. flowchart TD
A[Gateway status and desktop acquisition] --> B[Host Desktop source]
C[Managed Linux startup] --> D[RFB readiness probe]
B --> D
D --> E[Shared RFB authentication negotiator]
E --> F[Loopback VNC server]
F --> G[ClientInit and ServerInit]
G --> H[Close probe and report readiness]
Technical reviewBest possible solution: Complete configured readiness handshakes through the existing RFB negotiator while preserving credential-free discovery, interactive passwords, and managed fallback. Do we have a high-confidence way to reproduce the issue? Yes: current-main source closes probes before authentication, and the linked official-release report plus supplied real Gateway/TigerVNC baseline traces establish the resulting blacklist failure; this review executed no target code. Is this the best way to solve the issue? The patch repairs the responsible probe using the existing authentication owner, retains supported discovery and fallback behavior, and resolves the prior diagnostic defect without unnecessary parallel machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 33d26e441f91. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +178, Tests 0. Total +178 across 6 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (7 earlier review cycles)
Reviewed November 16, 2026, 4:25 AM ET / 09:25 UTC (Revision 8). |
Enabled readiness still finishes VncAuth before the probe closes. Setup discovery does not read the password file. Acquire checks the live desktop immediately before the credential write. An unreadable attach password no longer blocks managed mode when no server is listening. The DES response lives in one helper used by preauth and the probe. Signed-off-by: Sebastien Tardif <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
service.status now passes the live desktop guard into inspection. A credential response is not sent when the operator disables Host Desktop or replaces its port or password file while the VNC challenge is still outstanding. Signed-off-by: Sebastien Tardif <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Core lint rejects createDeferred<void> because void is already the default. Signed-off-by: Sebastien Tardif <[email protected]>
The negotiation cutover left the DES helper in its own module and returned protocol metadata no caller reads. The helper is private again, and connectRfbServer returns the stream and security types only. Signed-off-by: Sebastien Tardif <[email protected]>
|
@clawsweeper re-review Removed the scaffolding left by the negotiation cutover. Head 81a81cf. The DES helper is private in rfb-preauth.ts again, rfb-vnc-auth.ts is gone, and connectRfbServer returns only the stream and security types. The DES vector and the loopback VncAuth handshake still match. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Updated TigerVNC proof for final head d85ae19 ( Repeated real Gateway The server's baseline logs contain The consolidated password-file regression fails on the baseline with All seven contributor commits remain. Production: +178 lines (258 added / 80 removed); tests: net 0 (37 added / 37 removed); no allocation file. Existing test-case coverage is consolidated as described in the PR body. CODEOWNERS has no matching Desktop rule; the separate maintainer authentication-review gate remains required. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
/allow-security-sensitive-change |
* fix(desktop): finish VncAuth before a readiness probe closes Host desktop status, acquire, and managed Linux readiness closed the RFB socket after reading the security offer. TigerVNC treats that half-handshake as a failed client and blacklists 127.0.0.1, so the later desktop stream dies with an unsupported-security error. When a password is available, the same socket now selects VncAuth, checks the security result, and reads ServerInit before it closes. A wrong password is reported once instead of being dropped early. A missing password file still classifies the offer, because there is no credential that can finish the handshake. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): leave the preauth module unchanged The VncAuth response helper stays in the probe. rfb-preauth already imports that module, so sharing the helper from the auth file would cycle. Readiness does not change Gateway authentication. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): keep discovery and managed fallback credential-free Enabled readiness still finishes VncAuth before the probe closes. Setup discovery does not read the password file. Acquire checks the live desktop immediately before the credential write. An unreadable attach password no longer blocks managed mode when no server is listening. The DES response lives in one helper used by preauth and the probe. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): stop status probes after the desktop configuration changes service.status now passes the live desktop guard into inspection. A credential response is not sent when the operator disables Host Desktop or replaces its port or password file while the VNC challenge is still outstanding. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): reuse upstream RFB negotiation for readiness probes Configured VncAuth probes call negotiateServer on the retained socket. Security selection, the challenge response, and the security result use that owner, including its 64 KiB rejection limit. The probe keeps ClientInit and ServerInit, and still checks the live desktop guard before the credential write. The new rejection test fails on the previous probe, which dropped reasons longer than 1 KiB. rfb-probe, rfb-preauth, and host-source passed (64 tests). Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): drop default deferred type arguments Core lint rejects createDeferred<void> because void is already the default. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): keep VncAuth DES beside the preauth negotiator The negotiation cutover left the DES helper in its own module and returned protocol metadata no caller reads. The helper is private again, and connectRfbServer returns the stream and security types only. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): consolidate VncAuth readiness coverage * fix(desktop): preserve password rejection guidance --------- Signed-off-by: Sebastien Tardif <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 8af7148) Co-authored-by: RomneyDa <[email protected]>
…193487) * fix(desktop): finish VncAuth before a readiness probe closes Host desktop status, acquire, and managed Linux readiness closed the RFB socket after reading the security offer. TigerVNC treats that half-handshake as a failed client and blacklists 127.0.0.1, so the later desktop stream dies with an unsupported-security error. When a password is available, the same socket now selects VncAuth, checks the security result, and reads ServerInit before it closes. A wrong password is reported once instead of being dropped early. A missing password file still classifies the offer, because there is no credential that can finish the handshake. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): leave the preauth module unchanged The VncAuth response helper stays in the probe. rfb-preauth already imports that module, so sharing the helper from the auth file would cycle. Readiness does not change Gateway authentication. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): keep discovery and managed fallback credential-free Enabled readiness still finishes VncAuth before the probe closes. Setup discovery does not read the password file. Acquire checks the live desktop immediately before the credential write. An unreadable attach password no longer blocks managed mode when no server is listening. The DES response lives in one helper used by preauth and the probe. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): stop status probes after the desktop configuration changes service.status now passes the live desktop guard into inspection. A credential response is not sent when the operator disables Host Desktop or replaces its port or password file while the VNC challenge is still outstanding. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): reuse upstream RFB negotiation for readiness probes Configured VncAuth probes call negotiateServer on the retained socket. Security selection, the challenge response, and the security result use that owner, including its 64 KiB rejection limit. The probe keeps ClientInit and ServerInit, and still checks the live desktop guard before the credential write. The new rejection test fails on the previous probe, which dropped reasons longer than 1 KiB. rfb-probe, rfb-preauth, and host-source passed (64 tests). Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): drop default deferred type arguments Core lint rejects createDeferred<void> because void is already the default. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): keep VncAuth DES beside the preauth negotiator The negotiation cutover left the DES helper in its own module and returned protocol metadata no caller reads. The helper is private again, and connectRfbServer returns the stream and security types only. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): consolidate VncAuth readiness coverage * fix(desktop): preserve password rejection guidance --------- Signed-off-by: Sebastien Tardif <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
* fix(desktop): finish VncAuth before a readiness probe closes Host desktop status, acquire, and managed Linux readiness closed the RFB socket after reading the security offer. TigerVNC treats that half-handshake as a failed client and blacklists 127.0.0.1, so the later desktop stream dies with an unsupported-security error. When a password is available, the same socket now selects VncAuth, checks the security result, and reads ServerInit before it closes. A wrong password is reported once instead of being dropped early. A missing password file still classifies the offer, because there is no credential that can finish the handshake. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): leave the preauth module unchanged The VncAuth response helper stays in the probe. rfb-preauth already imports that module, so sharing the helper from the auth file would cycle. Readiness does not change Gateway authentication. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): keep discovery and managed fallback credential-free Enabled readiness still finishes VncAuth before the probe closes. Setup discovery does not read the password file. Acquire checks the live desktop immediately before the credential write. An unreadable attach password no longer blocks managed mode when no server is listening. The DES response lives in one helper used by preauth and the probe. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): stop status probes after the desktop configuration changes service.status now passes the live desktop guard into inspection. A credential response is not sent when the operator disables Host Desktop or replaces its port or password file while the VNC challenge is still outstanding. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): reuse upstream RFB negotiation for readiness probes Configured VncAuth probes call negotiateServer on the retained socket. Security selection, the challenge response, and the security result use that owner, including its 64 KiB rejection limit. The probe keeps ClientInit and ServerInit, and still checks the live desktop guard before the credential write. The new rejection test fails on the previous probe, which dropped reasons longer than 1 KiB. rfb-probe, rfb-preauth, and host-source passed (64 tests). Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): drop default deferred type arguments Core lint rejects createDeferred<void> because void is already the default. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): keep VncAuth DES beside the preauth negotiator The negotiation cutover left the DES helper in its own module and returned protocol metadata no caller reads. The helper is private again, and connectRfbServer returns the stream and security types only. Signed-off-by: Sebastien Tardif <[email protected]> * fix(desktop): consolidate VncAuth readiness coverage * fix(desktop): preserve password rejection guidance --------- Signed-off-by: Sebastien Tardif <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 8af7148) Co-authored-by: RomneyDa <[email protected]> Release adaptation: none; source change applies to the pinned beta baseline. Follow-up disposition: bounded pinned-main same-path audit recorded in the lane report; cross-lane changes remain parent-owned. (cherry picked from commit dcc60e1648971367620d3f73f0d30da55c1ba657)
What Problem This Solves
Fixes #193444. Host Desktop readiness closed password-protected RFB connections before VncAuth finished. TigerVNC counted those probes as failed clients, blacklisted loopback, and rejected the subsequent desktop connection.
Fix
Finish VncAuth using the existing configured password and the server's challenge, then complete shared ClientInit/ServerInit before closing the probe. Status, acquisition, and managed Linux readiness share the existing preauth negotiator. Disabled setup discovery remains credential-free. No new credential storage or configuration is introduced.
Sebastien Tardif's seven commits are preserved. The maintainer repair consolidates duplicate tests and removes the allocation file while preserving the contributor's authentication-specific errors. No pre-existing test case was removed; production delta is +178 lines and test delta is zero.
Evidence
source, Node + tsx).Connections: blacklisted: 127.0.0.1; Host Desktop fails with the existing unsupported-security error. These four production files are unchanged on main 41b339b.VNC authentication failed; check desktop.host.passwordFile and retry. No control logs a blacklist.vitest-source, 43.79 seconds including wrapper), plus the 29-test Host Desktop suite rerun after restoring guidance (40.61 seconds), focused lint, and formatting.fullbuild with declarations passed. The canonical tarball installed with package scripts enabled in Linux; its CLI--versionreports d85ae19 and--helppasses.Coverage now lives in the existing password-file source case, disabled-setup table, host reconfiguration cases, and shared preauth revocation/DES/SecurityResult tests. The DES table includes RFB 3.8; the shared rejection case uses 1,280 bytes; the managed fallback case includes an unreadable attach password file.
The PR changes no package manifests, lockfiles, install scripts, hooks, or patches. Builds ran through ocx on the host; all runtime proof, tests, and tarball execution stayed in the secretless container.
Two-way door: reverting restores the previous probe behavior; there is no new persisted state. Blast radius: configured Host Desktop VncAuth readiness and managed Linux desktop startup.