Skip to content

LND should fail connection upon receipt of unknown, evenly-typed message #7318

@Crypt-iQ

Description

@Crypt-iQ

From BOLT#01

upon receiving a message of even, unknown type:
    MUST close the connection.
    MAY fail the channels.

However, from my reading of the code, LND will just return UnknownMessage from makeEmptyMessage and continue to read the next message in the readHandler:

lnd/peer/brontide.go

Lines 1464 to 1468 in 143eba8

// compatible manner.
case *lnwire.UnknownMessage:
p.storeError(e)
idleTimer.Reset(idleTimeout)
continue

This is fine for unknown, odd messages but apparently not for unknown, even messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2should be fixed if one has timechannel managementThe management of the nodes channelsspec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions