Severity: Low
Category: Input Validation / Denial of Service (DoS) Protection
The RustFund protocol lacks explicit validation for the length of fund names and descriptions, relying instead on implicit system limits. This can result in unclear transaction failures and suboptimal user experience.
The fundCreate
function in lib.rs
accepts arbitrary-length strings for fund names and descriptions without explicit validation checks. Although Solana implicitly limits transaction sizes, exceeding these limits results in low-level encoding errors rather than informative protocol-level messages.
Specifically impacted components:
File: lib.rs
Function: fundCreate
Struct: Fund
Unclear and cryptic errors ("encoding overruns Buffer"
) when limits are exceeded.
Potential for wasted transaction fees on failed submissions.
Poor user experience due to lack of explicit validation feedback.
Manual Review
Anchor Framework
Explicitly enforce reasonable limits for metadata length, improving clarity and user experience:
There is a validation for the lengths of `name` and `description` in `fund_create` function: ``` pub struct Fund { #[max_len(200)] pub name: String, #[max_len(5000)] ..... } ``` Anchor will check for the lengths of these parameters and the function will fail if they have more characters than the constraints.
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.