Skip to content

Commit 5fb8bc0

Browse files
Update Improper PDA Validation mitigation
Co-authored-by: Samuel Moelius <35515885+smoelius@users.noreply.github.com>
1 parent dd84d05 commit 5fb8bc0

File tree

1 file changed

+1
-1
lines changed
  • not-so-smart-contracts/solana/improper_pda_validation

1 file changed

+1
-1
lines changed

not-so-smart-contracts/solana/improper_pda_validation/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let program_address = Pubkey::create_program_address(&[key.to_le_bytes().as_ref(
2020
```
2121
## Mitigation
2222

23-
The `find_program_address` function continously checks the expected value (via passing in the intended bump seed) and will return an error in the case the PDA address and/or bump don't match with the expected values.
23+
The `find_program_address` function finds the largest bump seeds for which there exists a corresponding PDA (i.e., an address not on the ed25519 curve), and returns both the address and the bump seed. The function panics in the case that no PDA address can be found.
2424

2525
```rust
2626
let (address, system_bump) = Pubkey::find_program_address(&[key.to_le_bytes().as_ref()], program_id);

0 commit comments

Comments
 (0)