fix(agent): harden package broker pipe against connection floods - #1902
Conversation
…path Cap concurrent pipe connections with a semaphore, move client identity capture off the accept loop, and defer account-name resolution (which may hit a domain controller) to the rare mismatch error path. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Implementation notes (follow-up to #1847 (review)):
|
Let maintainers know that an action is required on their side
|
There was a problem hiding this comment.
Pull request overview
Hardens the Windows package broker named-pipe server against connection-flood denial of service.
Changes:
- Caps concurrent pipe connections at 16.
- Moves identity capture outside the accept loop.
- Defers client account-name resolution until needed.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
devolutions-agent/src/broker/pipe.rs |
Adds connection limiting and asynchronous handling. |
devolutions-agent/src/broker/auth.rs |
Stores client SID and resolves account names lazily. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Benoît Cortier (CBenoit)
left a comment
There was a problem hiding this comment.
Review complete: no substantiated findings.
The protocol/API analysis found no applicable Open Specifications requirements. The skeptical concerns were not confirmed because each pipe connection serves one HTTP request and the new semaphore bounds remaining unauthenticated work to 16 concurrent connections.
Idle clients holding a connection open without sending a request could pin all connection slots indefinitely. A 30-second per-connection deadline frees the slot. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
23a9784
into
master
Hardens the package broker named pipe server against cheap denial-of-service via connection floods.
Previously, every incoming connection triggered unauthenticated identity lookups (process open, executable path, account name resolution) before any signature validation, and connections were served without any concurrency limit.
Now the broker caps the number of concurrently served pipe connections, performs client identity capture off the accept loop so a slow lookup cannot stall other connections, and defers account-name resolution (which may reach a domain controller) until it is actually needed for an error message.
This bounds the work an unauthenticated flood can trigger and keeps the broker responsive for legitimate clients.
Issue: DGW-413