I am having issues understanding 2-of-2 multisig, with regards to the malleability attack. Where Alice and Bob set up a multisig payment channel where Alice sends 1 BTC in order to do multiple tx afterwards in the payment channel. Where, before Alice can send, Bob needs to sign a 2-of-2 refund over n-locktime.
Alice to MultisigAddr:
1BTC , in: txid-A[n], out: MultisigAddr ---> txid-M
Refund to Alice:
1BTC, in: txid-M,out: RefundAliceAddr ---> txid-R with n-locktime, Signed by Bob
In the malleability attack the broadcasted txid-M gets changed to another value, txid-C in order to render the refund to Alice invalid, locking her funds in the multisig channel +-
What I don't understand is how txid-M can be known for Bob to sign the 2of2 multisig transaction for the refund, since it requires the hashing of the transaction from Alice to MultisigAddr first. Did I make an error here somewhere in my construct?