ooni / minivpn

A minimalistic OpenVPN implementation in Go
GNU General Public License v3.0
36 stars 6 forks source link

lack of P_ACK within the change cipher spec packet #34

Open ainghazal opened 1 year ago

ainghazal commented 1 year ago

Originally reported by 7asecurity during their security audit:

During TLS/VPN negotiation, OpenVPN clients send a Change Cipher Spec P_CONTROL_V1 packet, which contains an embedded P_ACK_V1 packet. OpenVPN in that way uses the ability to combine both P_CONTROL and P_ACK payloads1 inside a single packet. However, minivpn sends two packets (see figure)

missing_p_ack

I think this is due to the naive implementation of the ack mechanism in the current state, that doesn't allow to send ACKs for several packet ids within a single control packet. I think this can be better handled after landing #32