Skip to content

dign hangs forever on a CLI endpoint holder that accepts and never answers #218

Description

@MichaelTaylor3d

Task

dign hangs forever if whatever holds the CLI endpoint accepts the connection and then never answers. Give the lane a read deadline so a person gets a refusal instead of a dead terminal.

Context

Found while closing the pre-authentication rendering finding on #215 (parent epic: https://github.com/DIG-Network/dig_ecosystem/issues/908). Pre-existing, not introduced by that PR, and no peer-authored bytes are involved — so it was logged rather than folded into that diff.

crates/dig-app-core/src/cli_session/ sets no timeout anywhere: grep -rn timeout crates/dig-app-core/src/cli_session/*.rs returns nothing. client::send_via blocks in frames.recv_frame() with no deadline, and the endpoint address is derived from the login name and needs no privilege to claim, so any local principal can hold it and stall. It does not even need to be hostile — a crashed or wedged process holding the pipe does the same thing.

The mutual handshake landed in PR#215 means such a peer can no longer harvest the secret or choose what dign prints. It can still stop dign from ever returning.

Scope

A read (and write) deadline on the CLI lane's client side, surfaced as NOT_CONNECTED with the existing remedy — the honest answer, since a peer that will not speak is indistinguishable from an app that is not running. The server side wants one too, so one stalled client cannot pin an accept slot.

Evidence

A test that binds the endpoint, accepts, and never writes; send_via must return rather than block. That test would hang today, so it is also the reproduction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingkind:businessa person can do something new, $DIG moves, or a shipped surface stops lying to thempriority:2-mediumnormal backlog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions