Skip to content

Hardened xpub wildcard causes panic during ELIP151 derivation #107

Description

@RCasatta

elements-miniscript accepts descriptors containing a hardened wildcard on an xpub, such as xpub.../*h. Calling Key::from_elip151 on the resulting descriptor panics:

called Result::unwrap() on an Err value: HardenedChild

DescriptorPublicKey::at_derivation_index creates a DefiniteDescriptorKey containing a hardened public derivation. Later, DefiniteDescriptorKey::to_public_key unwraps the failure from derive_public_key.

Malformed or unsupported descriptors should return ConversionError::HardenedChild instead of panicking. This is reachable when parsing untrusted descriptor strings and can cause denial of service.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions