You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix pre-noise peer disconnect panic on non-Err disconnect
366e796 fixed the same crash for
Errs that come up during handshake, but was incomplete and should
have just dropped the node_id being different based on
inbound/outbound. This patch does so and actually fixes the issue.
Found by fuzzer.
let next_step = peer.channel_encryptor.get_noise_step();
439
433
match next_step {
440
434
NextNoiseStep::ActOne => {
441
-
let act_two = try_potential_handleerror!(peer.channel_encryptor.process_act_one_with_key(&peer.pending_read_buffer[..],&self.our_node_secret),true).to_vec();
435
+
let act_two = try_potential_handleerror!(peer.channel_encryptor.process_act_one_with_key(&peer.pending_read_buffer[..],&self.our_node_secret)).to_vec();
442
436
peer.pending_outbound_buffer.push_back(act_two);
443
437
peer.pending_read_buffer = [0;66].to_vec();// act three is 66 bytes long
444
438
},
445
439
NextNoiseStep::ActTwo => {
446
-
let act_three= try_potential_handleerror!(peer.channel_encryptor.process_act_two(&peer.pending_read_buffer[..],&self.our_node_secret),true).to_vec();
0 commit comments