Impact
The SCTP network driver, inet_drv.c, in the BEAM VM contains a stack buffer overflow bug that allows a remote, unauthenticated attacker to crash the VM by sending a single crafted SCTP ERROR chunk, after successfully creating an SCTP association to a listening SCTP port.
In a hypothetical VM, built without stack protection, which is not default, the overflow should not have the potential to achieve Remote Code Execution since the attacker can only write 16-bit values interleaved with a fixed tag hence not a controlled return address. For a VM with standard build stack protection, there should be no way to skip over the stack canary and corrupt the stack without triggering the stack protection and crash the VM process.
A crafted SCTP ERROR chunk may also leak bits and pieces of Erlang VM memory into the received error packet in the Erlang process. Such data, conceptually, is already allowed to read by the system user that runs the Erlang VM, but it would probably be against the application's intention, so the harm caused by such a data leak should be limited.
Systems are affected when SCTP support is enabled, a listening SCTP socket is opened via gen_sctp with the default inet backend, and the listening port is reachable from the attacker's network.
Workarounds
No workarounds besides not opening an SCTP listening socket on a network an attacker can reach.
Not running a VM built without stack protection would avoid the faint possibility of Remote Code Execution or continuing to run with a corrupted stack.
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 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.
In the case of this vulnerability, versions prior to OTP 17.0 are also affected — the vulnerable code has existed unchanged since SCTP support was introduced . Windows builds are unaffected because SCTP is not supported on Windows.
Impact
The SCTP network driver, inet_drv.c, in the BEAM VM contains a stack buffer overflow bug that allows a remote, unauthenticated attacker to crash the VM by sending a single crafted SCTP ERROR chunk, after successfully creating an SCTP association to a listening SCTP port.
In a hypothetical VM, built without stack protection, which is not default, the overflow should not have the potential to achieve Remote Code Execution since the attacker can only write 16-bit values interleaved with a fixed tag hence not a controlled return address. For a VM with standard build stack protection, there should be no way to skip over the stack canary and corrupt the stack without triggering the stack protection and crash the VM process.
A crafted SCTP ERROR chunk may also leak bits and pieces of Erlang VM memory into the received error packet in the Erlang process. Such data, conceptually, is already allowed to read by the system user that runs the Erlang VM, but it would probably be against the application's intention, so the harm caused by such a data leak should be limited.
Systems are affected when SCTP support is enabled, a listening SCTP socket is opened via
gen_sctpwith the defaultinetbackend, and the listening port is reachable from the attacker's network.Workarounds
No workarounds besides not opening an SCTP listening socket on a network an attacker can reach.
Not running a VM built without stack protection would avoid the faint possibility of Remote Code Execution or continuing to run with a corrupted stack.
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 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.
In the case of this vulnerability, versions prior to OTP 17.0 are also affected — the vulnerable code has existed unchanged since SCTP support was introduced . Windows builds are unaffected because SCTP is not supported on Windows.