Skip to content
  • Jason Yellick's avatar
    [FAB-5207] Check channel create channelID mismatch · 4709b338
    Jason Yellick authored
    
    
    The flow for channel creation works loosely as follows.
    
    1. Look up channel resources by channelID from ChannelHeader
    2. If missing, propose a new channel, based on the config update
    3. Extract the channel ID from the config update, create a template
    config from the consortium definition, and check if the config update
    satisfies the channel creation policy.
    4. Add the new channel resources to the channels map.
    
    The problem is that between step 1/2 if the channelID is mismatched, the
    internal channel construction logic will believe it is building
    channelInner, while externally, this channel gets registered as
    channelOuter.
    
    Thus, it is possible to replay a channel creation TX by modifying the
    outer header.  The new channel will be somewhat broken and all
    configuration updates against it will fail.
    
    This CR adds a simple check to verify that the ChannelHeader ChannelID
    matches the ConfigUpdate channelID.
    
    Change-Id: I23b088563016e0aa9f30524887c3c3d49b5942fb
    Signed-off-by: default avatarJason Yellick <jyellick@us.ibm.com>
    4709b338