webrtc-srtp 0.12.0 stored every sequence number and used a 100-packet window to guess the rollover counter. A NACK retransmission of a pre-wrap packet sent after the wrap (65000 after 85) rewound that state, so the next new packets were protected with ROC+1 and the viewer failed authentication on all of them: frozen video after the Windows viewer returned from the background. Vendor webrtc-srtp 0.12.0 with the RFC 3711 Appendix A half-space estimate and a high-water index that retransmissions cannot move back. Regression tests fail on upstream (65000 != 85) and pass with the fix for AES-CM/HMAC and AES-GCM. Co-authored-by: VallierDev <[email protected]> Co-authored-by: AYssu <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
860 B
Local patch to webrtc-srtp 0.12.0
Source: crates.io webrtc-srtp 0.12.0 (MIT / Apache-2.0; upstream licenses retained).
SrtpSsrcState estimates the rollover counter with the half-sequence-space rule from
RFC 3711 Appendix A and only advances to the highest packet index seen. Upstream used a
100-packet window and stored every sequence number, so a NACK retransmission of a
pre-wrap packet sent after the wrap (e.g. 65000 after 85) moved the state back and the
next new packet was protected with ROC+1; the receiver then failed authentication for
every following packet (frozen video, #83). Fix and regression tests contributed by
@AYssu. Cipher code, wire format and SRTCP are unchanged.
The upstream lifecycle test jumped from 5004 to 65535, outside the half-space window; bridge packets keep it consecutive and the known-answer vectors are unchanged.