The Fund struct declares name with #[max_len(200)], implying that campaign names up to 200 bytes are supported. However, in FundCreate, name.as_bytes() is directly used as a PDA seed:
The Solana runtime strictly limits the length of any individual PDA seed to 32 bytes (solana_program::pubkey::MAX_SEED_LEN = 32). If a user attempts to create a campaign with a name between 33 and 200 bytes, find_program_address or create_program_address fails with PubkeyError::MaxSeedLengthExceeded.
Likelihood: Medium (Any campaign title longer than 32 characters triggers the error)
Impact: Medium (Blocks campaign creation for valid descriptive names within the declared 200-byte boundary)
A creator attempts to launch a campaign titled: "Clean Water & Energy Initiative 2025".
The byte length of this UTF-8 string is 38 bytes (> 32 bytes).
Anchor attempts to derive the PDA address using name.as_bytes().
The Solana runtime aborts the transaction with MaxSeedLengthExceeded.
Either enforce that name is limited to at most 32 bytes in the instruction and data struct, or hash the name using SHA-256 to ensure a constant 32-byte seed:
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.