Impact
Initial previous_cookie_secret is initialized to the emty binary , A HMAC with empty key is deterministic and predictable. Anyone who knows the HMAC algorithm and the ClientHello contents can compute dtls_handshake:cookie(<<>>, IP, Port, Hello) and forge a valid cookie before the first rotation of cookie value.
The DTLS cookie (RFC 6347 §4.2.1) is a DoS mitigation — it prevents attackers from using spoofed source IPs to force the server to allocate state and perform expensive crypto operations (amplification attack). It is NOT an authentication mechanism.
During the window from server startup until first secret rotation (0-15s), an attacker who can observe the plaintext ClientHello can compute the valid cookie (HMAC-SHA1(<<>>, known_data)) and bypass the address verification.
Affected/Unaffected Versions
A version larger than or equal to one of the listed patched versions is unaffected; otherwise, a version that satisfies an expression listed under affected versions is affected, and if it does not, it is unaffected.
The code setting the initial cookie to the empty binary was introduced in OTP-20, however previous versions DTLS was not supported the code was only an experimental prototype that hardcoded the cookie.
Credits
Thanks to Lukas Backström at Erlang Solutions for finding and responsibly disclosing this vulnerability to the Erlang/OTP project.
Impact
Initial previous_cookie_secret is initialized to the emty binary , A HMAC with empty key is deterministic and predictable. Anyone who knows the HMAC algorithm and the ClientHello contents can compute dtls_handshake:cookie(<<>>, IP, Port, Hello) and forge a valid cookie before the first rotation of cookie value.
The DTLS cookie (RFC 6347 §4.2.1) is a DoS mitigation — it prevents attackers from using spoofed source IPs to force the server to allocate state and perform expensive crypto operations (amplification attack). It is NOT an authentication mechanism.
During the window from server startup until first secret rotation (0-15s), an attacker who can observe the plaintext ClientHello can compute the valid cookie (HMAC-SHA1(<<>>, known_data)) and bypass the address verification.
Affected/Unaffected Versions
A version larger than or equal to one of the listed patched versions is unaffected; otherwise, a version that satisfies an expression listed under affected versions is affected, and if it does not, it is unaffected.
The code setting the initial cookie to the empty binary was introduced in OTP-20, however previous versions DTLS was not supported the code was only an experimental prototype that hardcoded the cookie.
Credits
Thanks to Lukas Backström at Erlang Solutions for finding and responsibly disclosing this vulnerability to the Erlang/OTP project.