TCP retransmission fixes and fuzz failure fixes (#59)

* fix for #58

* add fixes for both retransmit and fuzz failure found

* fix infinite challenge ack due to RST+SYN+FIN corrupt packet in SYNRCV state

* fuzz: previous recovery ack path led to infinite transmit

* fuzz: calculate CRCs when fuzzing to reduce search space to non-CRC error cases

* add local fuzz corpus to tests

* add more cases to fuzz corpus
This commit is contained in:
Pat Whittingslow
2026-03-20 14:25:31 +01:00
committed by GitHub
parent 493446244f
commit faae7ab076
216 changed files with 1299 additions and 35 deletions
+6 -1
View File
@@ -97,7 +97,12 @@ func (tcb *ControlBlock) rcvFinWait1(seg Segment) (pending Flags, err error) {
default:
return 0, errFinwaitExpectedACK
}
pending = FlagACK
// Only queue ACK when there is data or FIN to acknowledge.
// Bare ACKs must not elicit an ACK response; doing so creates an
// infinite ACK ping-pong when the peer sends challenge ACKs.
if seg.DATALEN > 0 || hasFin {
pending = FlagACK
}
return pending, nil
}