Skip to content

Conversation

crStiv
Copy link

@crStiv crStiv commented Sep 17, 2025

Replace infinite loop in Keypair::from_seed with proper error handling to prevent potential DoS attacks.

The function previously hung indefinitely when given an invalid seed that couldn't be converted to a valid secp256k1 private key. This change:

  • Returns Result<Self, InvalidSecretKey> instead of Self
  • Updates all callers to handle the new return type
  • Prevents application hangs on invalid input

Files changed:

  • multisig/src/lib.rs: Core fix
  • timeboost-utils/src/lib.rs: Update caller
  • tests/src/tests/consensus/helpers/shaping.rs: Update caller

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant