The LLMOracleCoordinator
contract manages responses from generators and validators in a decentralized LLM oracle system. Generators provide responses to tasks which are then validated by validators. The winning response (with highest validation score) is used by the BuyerAgent
contract to make purchase decisions.
The respond()
function in LLMOracleCoordinator
allows generators to submit responses with unconstrained output size. This creates a vulnerability where a malicious generator can submit an extremely large response that must be processed by:
The BuyerAgent
contract when processing the winning response
The issue is compounded by the fact that a malicious actor can manipulate the validation scoring system (through other vulnerabilities) to ensure their oversized response becomes the winning one that must be processed by downstream consumers (BuyerAgent).
High. This vulnerability can:
Make the BuyerAgent
contract unusable if the winning response is too large to process
Lead to excessive gas costs for contract interactions
Medium. While implementing this attack requires some sophistication in manipulating the validation scores, the core vulnerability (unbounded response size) is straightforward to exploit. The economic incentives also favor the attacker as they can profit from breaking the protocol's functionality.
Add size limits to the output
parameter in the respond()
function:
The MAX_OUTPUT_SIZE
should be carefully chosen based on:
Gas limits for validators processing the output
Reasonable size limits for LLM responses
Maximum size that buyer agents can process efficiently
Consider also making this limit configurable by the owner.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.