Skip to content

Don't block on channel send in oracle fee polling.#3590

Open
jholdstock wants to merge 1 commit intodecred:masterfrom
jholdstock:non-block-oracle
Open

Don't block on channel send in oracle fee polling.#3590
jholdstock wants to merge 1 commit intodecred:masterfrom
jholdstock:non-block-oracle

Conversation

@jholdstock
Copy link
Copy Markdown
Member

Because this channel send occurs without a timeout or non-blocking select fallback, a delay in the consuming goroutine which synchronously transmits the fees to connected WebSocket clients will lock the Oracle's execution thread indefinitely. A remote attacker can exploit this architectural flaw by initiating slow or locked WebSocket connections (e.g. Slow Loris), effectively paralyzing the server's global fee rate calculations and resulting in a Denial of Service.

As the ticker-driven background Oracle loop should never be subject to downstream consumer availability, the channel send must be refactored to be non-blocking. This allows the Oracle to drop a broadcast instance under severe load to prioritize system health rather than failing globally.

Because this channel send occurs without a timeout or non-blocking
select fallback, a delay in the consuming goroutine which synchronously
transmits the fees to connected WebSocket clients will lock the Oracle's
execution thread indefinitely. A remote attacker can exploit this
architectural flaw by initiating slow or locked WebSocket connections
(e.g. Slow Loris), effectively paralyzing the server's global fee rate
calculations and resulting in a Denial of Service.

As the ticker-driven background Oracle loop should never be subject to
downstream consumer availability, the channel send must be refactored to
be non-blocking. This allows the Oracle to drop a broadcast instance
under severe load to prioritize system health rather than failing
globally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant