Skip to content

False positive due to non-minimal channel type #217

Description

@morehouse

Found a false positive while fuzzing LND:

Test case failed: invalid accept_channel for temporary_channel_id 0cdb006c68ca6c9d84f83bdc302b272f658ae589bd3481b3bd9fef4270a47420: invalid accept_channel: accept_channel channel_type does not match open_channel

The executor sent an open_channel with channel_type = [0x00]. LND responded with the same value minimally encoded: channel_type = []. The oracle flagged that they don't match.

Suggested fix

We should strip leading zeroes before comparing channel types here:

// Check that the channel type matches the one in open_channel.
if open_channel.tlvs.channel_type != accept_channel.tlvs.channel_type {
return Err("accept_channel channel_type does not match open_channel".to_string());
}

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