Skip to content

Conversation

@matthiasgeihs
Copy link
Contributor

…ttlement updates

We are intercepting updates for subchannel funding and settlement. However,
we did not check the signatures for these updates. This is fixed now.

Signed-off-by: Matthias Geihs matthias@perun.network

Closes #57

c.machMtx.Lock() // Lock machine while update is in progress.
defer c.machMtx.Unlock()

if err := c.machine.CheckUpdate(req.State, req.ActorIdx, req.Sig, pidx); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems alright to move this up here, but we now do not check anymore for pidx == req.ActorIDx.
To keep the protocol simple we should also put that check here.
Otherwise a sub-channel proposer could put the proposee as Actor for the update.

The check is currently done in validTwoPartyUpdate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give an example what would be problematic with this? I suggest you make a separate issue for that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alice can now send a subChannelFundings or subChannelWithdrawals to Bob and put Bobs index as actorIDx.
For Bob it now looks like he received an update from himself.

I think it is not a security issue, but still unclean.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's not clean, I agree. On the other hand, it is a separate issue, so you may want to create one. I had a look into it and it may require some careful thinking.

The issue addressed here is more critical and I would like to get the change through without too much delay.

…ent updates

We are intercepting updates for subchannel funding and settlement. However,
we did not check the signatures for these updates. This is fixed now.

Signed-off-by: Matthias Geihs <matthias@perun.network>
@ggwpez ggwpez force-pushed the 57-validate-subchannel-signatures branch from 5d12a80 to bc0d3b3 Compare May 5, 2021 08:33
@ggwpez ggwpez enabled auto-merge May 5, 2021 08:34
@ggwpez ggwpez disabled auto-merge May 5, 2021 08:34
@ggwpez ggwpez enabled auto-merge May 5, 2021 08:35
@ggwpez ggwpez merged commit 02c0211 into hyperledger-labs:dev May 5, 2021
@ggwpez ggwpez deleted the 57-validate-subchannel-signatures branch May 5, 2021 08:36
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.

Client does not verify signatures for subchannel funding and withdrawal updates

2 participants