Am I affected?

type your erlang.org/otp version to check

Description

Stack-based Buffer Overflow vulnerability in Erlang OTP erts (inet_drv) allows an unauthenticated remote attacker to crash the BEAM VM by sending a crafted SCTP ERROR chunk.

The sctp_parse_error_chunk function in erts/emulator/drivers/common/inet_drv.c parses SCTP ERROR chunks and writes cause codes into a fixed-size stack-allocated ErlDrvTermData spec[] array without checking bounds. A remote attacker who has established an SCTP association to a listening port can send a single crafted SCTP ERROR chunk containing enough cause codes to overflow the stack buffer, crashing the VM. The attacker can only write 16-bit values interleaved with a fixed tag, so the overflow does not provide a controlled return address, limiting exploitation to Denial of Service.

A crafted SCTP ERROR chunk may also leak bits and pieces of Erlang VM memory into the received error packet observed by the Erlang process. Such data is already readable by the user running the Erlang VM, so the disclosure scope is limited.

This issue affects OTP from OTP 17.0 before OTP 27.3.4.13, OTP 28.5.0.2, and OTP 29.0.2, corresponding to erts from 6.0 before 15.2.7.9, 16.4.0.2, and 17.0.2. Whether OTP before OTP 17.0, corresponding to erts before 6.0, is affected is unknown.

Weaknesses & attack patterns

Weakness

CWE-121 · Stack-based Buffer Overflow in catalog → MITRE ↗

Attack patterns

CAPEC-100 · Overflow Buffers MITRE ↗

Affected — Erlang

≥ 17.0 and up affected
→ 27.3.4.13 not affected
→ 28.5.0.2 not affected
→ 29.0.2 not affected
every other version: unknown
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
version type otp
modules · source files · routines
modules inet_drv
source files erts/emulator/drivers/common/inet_drv.c
routines sctp_parse_error_chunk

Affected — Erlang / erts Repository ↗

≥ 6.0 and up affected
→ 15.2.7.9 not affected
→ 16.4.0.2 not affected
→ 17.0.2 not affected
every other version: unknown
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
version type otp
modules · source files · routines
modules inet_drv
source files emulator/drivers/common/inet_drv.c
routines sctp_parse_error_chunk

Affected — GitHub / erlang/otp Repository ↗

≥ 84adefa < 3983d49 affected
≥ 3983d49 and up not affected
every other version: unknown
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
version type git
modules · source files · routines
modules inet_drv
source files erts/emulator/drivers/common/inet_drv.c
routines sctp_parse_error_chunk

Configurations

SCTP support must be compiled into OTP. A listening SCTP socket must be opened via gen_sctp with the default inet backend and must be reachable from the attacker's network. Windows builds are unaffected as SCTP is not supported on Windows.

References

Credits

Zhang Delong Finder
Raimo Niskanen Remediation developer

CVSS breakdown

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
« All CVEs