Dria

Swan
NFTHardhat
21,000 USDC
View results
Submission Details
Severity: medium
Valid

No whitelisting mechanism allows malicious validators and generators to DoS the protocol

Summary

A malicious actor can DoS the entire protocol by using LLMOracleCoordinator::respond and LLMOracleCoordinator::validate.

Vulnerability Details

Lack of whitelisting mechanism in LLMOracleRegistry allows anyone to become a Validator or Generator via LLMOracleRegistry::register function which is public in nature:

function register(LLMOracleKind kind) public {

This allow malicious actors to simple register a lot of malicious validators and generators which can be simply used to DoS (Denial of Service) the entire work-flow of the protocol by calling the LLMOracleCoordinator::respond and LLMOracleCoordinator::validate functions respectively because these functions have checks in place that only allow a certain number of calls for a particular taskId.

Number of generations and validations are binded by parameters.numGenerations and parameters.numValidationswhich can be simply DoSed.

function validate(uint256 taskId, uint256 nonce, uint256[] calldata scores, bytes calldata metadata)
public
onlyRegistered(LLMOracleKind.Validator)
onlyAtStatus(taskId, TaskStatus.PendingValidation)
{
// rest of the code
@> bool isCompleted = validations[taskId].length == task.parameters.numValidations;
// rest of the code
function respond(uint256 taskId, uint256 nonce, bytes calldata output, bytes calldata metadata)
public
onlyRegistered(LLMOracleKind.Generator)
onlyAtStatus(taskId, TaskStatus.PendingGeneration)
{
// rest of the code
@> bool isCompleted = responses[taskId].length == uint256(task.parameters.numGenerations);
// rest of the code
}

Impact

This opens the possibility of DoS for the entire protocol.

Tools Used

Manual Review

Recommendations

Introduce whitelisting in LLMOracleRegistry in order to make it centralized / trusted.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

There is no oracle whitelisting

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.