Impact
The Erlang external term format (ETF) calculates the size of a large tuple using 32-bit unsigned integer, but decodes the external term using 32-bit signed integer. The decoding function takes the tuple size into consideration when working with the heap; thus, the decoding function incorrectly may move the heap pointer to the wrong memory location. The C function decoded_size() and dec_term() are part of the external.c file that makes up the Erlang runtime. A necessary condition is any call to binary_to_term/1 that accepts untrusted input data from the attacker, or when there is data that contains the condition that triggers the crash to the Erlang VM.
Workarounds
No workarounds are known.
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 documentation of the new OTP version scheme describes how versions should be compared. Note that versions used prior to OTP 17.0, when the new OTP version scheme was introduced, are never listed since it is not well defined how to compare those versions.
Credits
Thanks to Nick Gunn (nick@ausimian.net) for finding and responsibly disclosing this vulnerability to the Erlang/OTP project.
Impact
The Erlang external term format (ETF) calculates the size of a large tuple using 32-bit unsigned integer, but decodes the external term using 32-bit signed integer. The decoding function takes the tuple size into consideration when working with the heap; thus, the decoding function incorrectly may move the heap pointer to the wrong memory location. The C function
decoded_size()anddec_term()are part of theexternal.cfile that makes up the Erlang runtime. A necessary condition is any call tobinary_to_term/1that accepts untrusted input data from the attacker, or when there is data that contains the condition that triggers the crash to the Erlang VM.Workarounds
No workarounds are known.
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 documentation of the new OTP version scheme describes how versions should be compared. Note that versions used prior to OTP 17.0, when the new OTP version scheme was introduced, are never listed since it is not well defined how to compare those versions.
Credits
Thanks to Nick Gunn (nick@ausimian.net) for finding and responsibly disclosing this vulnerability to the Erlang/OTP project.