[GH-ISSUE #3435] ghidra: Windows loopback bridge ends the session on the first unauthenticated connection #1280

Closed
opened 2026-10-16 21:03:42 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @GovinduSasanka on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/3435

bridge/ghidra/ReaGhidraBridge.java (serveLoopbackTcp → acceptClient) binds 127.0.0.1, calls accept() once, and serves only that connection. serveClient returns when the first line fails authentication or parsing, and the bridge then shuts down.

Trigger: any local process (another user, or a browser fetch to a guessed port) connects first and sends one invalid line.
Result: the REA session's Ghidra bridge exits; REA's own client can no longer connect. This is denial of service only: the token is checked in constant time on every request, so no command runs and the token is never exposed.

Expected: close unauthenticated connections and keep accepting (bounded), and keep today's behavior once a client has authenticated.

Reviewed at fa4b828. A PR follows.

Originally created by @GovinduSasanka on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/3435 `bridge/ghidra/ReaGhidraBridge.java` (`serveLoopbackTcp` → `acceptClient`) binds 127.0.0.1, calls `accept()` once, and serves only that connection. `serveClient` returns when the first line fails authentication or parsing, and the bridge then shuts down. **Trigger:** any local process (another user, or a browser `fetch` to a guessed port) connects first and sends one invalid line. **Result:** the REA session's Ghidra bridge exits; REA's own client can no longer connect. This is denial of service only: the token is checked in constant time on every request, so no command runs and the token is never exposed. **Expected:** close unauthenticated connections and keep accepting (bounded), and keep today's behavior once a client has authenticated. Reviewed at fa4b828. A PR follows.
Author
Owner

@GovinduSasanka commented on GitHub (Oct 14, 2026):

Correction: I filed this against an older checkout (fa4b828). Current main already handles it: acceptAuthenticatedLoopbackClient (d4bd65c) reads a bounded, timed handshake and keeps accepting after a rejected peer. That also covers the hold-open case my proposal did not. Closing as already fixed; #3440 no longer touches the Ghidra bridge.

<!-- gh-comment-id:6166803909 --> @GovinduSasanka commented on GitHub (Oct 14, 2026): Correction: I filed this against an older checkout (fa4b828). Current `main` already handles it: `acceptAuthenticatedLoopbackClient` (d4bd65c) reads a bounded, timed handshake and keeps accepting after a rejected peer. That also covers the hold-open case my proposal did not. Closing as already fixed; #3440 no longer touches the Ghidra bridge.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1280
No description provided.