mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 16:56:52 +01:00
multiport: carry a lost install race's counter to the surviving lane window
Two routines can race on a lane's first packet and derive a session each. Only one gets installed, and the loser was dropped along with the replay-window entry for the packet it had just accepted, leaving that one counter replayable. The two sessions hold identical keys, so the winner's window is the same window in every respect that matters: mark the counter seen on it instead. Closes the gap without putting a lock on the decrypt path.
This commit is contained in:
1 parent
8c5c740571
commit
e3efe0c53d
4 files changed
+31
-14
No files matched your search
+1
-1
@@ -177,7 +177,7 @@ func (f *Interface) readOutsidePackets(via ViaSender, packet []byte, rxc *rxCont
|
||||
if !laneCached {
|
||||
// The packet decrypted, so the peer really is using this lane and the
|
||||
// session we derived for it is worth keeping.
|
||||
hostinfo.lanes.installSession(lane, ci)
|
||||
hostinfo.lanes.installSession(f.l, lane, ci, h.MessageCounter)
|
||||
}
|
||||
|
||||
// Roam before we respond, but only on the base tunnel: a lane's source
|
||||
|
||||
Reference in new issue
Block a user