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 outbound peer disconnect panic found by fuzzer
If we make an outbound connection to a peer who we are already
connected to, and the outbound connection fails
pre-noise-completion, we will remove the original peer connection
from our node_id_to_descriptor map.
The fuzzer managed to find this by crashing in Channel's assertions
that we don't do a get_channel_reestablish() when the Channel isn't
already marked disconnected.
let next_step = peer.channel_encryptor.get_noise_step();
433
439
match next_step {
434
440
NextNoiseStep::ActOne => {
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();
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();
436
442
peer.pending_outbound_buffer.push_back(act_two);
437
443
peer.pending_read_buffer = [0;66].to_vec();// act three is 66 bytes long
438
444
},
439
445
NextNoiseStep::ActTwo => {
440
-
let act_three = try_potential_handleerror!(peer.channel_encryptor.process_act_two(&peer.pending_read_buffer[..],&self.our_node_secret)).to_vec();
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