-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Milestone
Description
🐛 Bug Report
Past Issues Searched
- I have searched open and closed issues to make sure that the bug has not yet been reported
Issue is a Bug Report
- This is a bug report and not a feature request, nor asking for support
Describe the bug
AIDojoCoordinator/coordinator.py contains a critical unauthenticated DoS in run_game().
At [AIDojoCoordinator/coordinator.py:422] parsing is attempted via Action.from_json(message). If parsing fails, the exception is logged ([lines 425-428]), but execution continues to match action.type ([line 429]). Because action was never assigned on parse failure, this triggers UnboundLocalError, which crashes the main action-processing coroutine.
A single malformed client packet can therefore kill central game action handling for all agents.
Reproduction
- Connect to the coordinator TCP port.
- Send malformed payload (e.g.,
not-a-json-message). Action.from_jsonthrows.- Server then evaluates
action.typeand crashesrun_game().
Impact
- Service-wide denial of service.
- No authentication required.
- One packet is enough to break central gameplay processing.
Expected behavior
Malformed input should be handled safely:
- Return a
BAD_REQUESTstyle response to that client. - Continue processing future messages.
- Never dereference
actionunless parsing succeeded.
Screenshots
Not applicable.
Environment
- OS: macOS
- Browser: N/A (TCP service)
- Browser Version: N/A
Suggested fix
- In the
exceptblock, enqueue an error response andcontinuethe loop. - Guard dispatch (
match action.type) behind successful parse. - Add regression test: malformed packet must not terminate
run_game().
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels