Am I affected?

This record states its affected versions in a form that can't be compared automatically.

3.7.16 and up affected
5.5.2.1 not affected
5.7.0.1 not affected
5.8.1 not affected
every other version: unknown

Description

Stack-based Buffer Overflow vulnerability in Erlang OTP (erl_interface) allows Stack-based Buffer Overflow.

This vulnerability is associated with program file lib/erl_interface/src/misc/ei_printterm.c and program routine ei_s_print_term.

The C function ei_s_print_term uses an internal 2000-character stack buffer to format terms. When called with an encoded Erlang term containing a very large integer (encoded representation exceeding 2000 characters), the buffer overflows. The overflow bytes are restricted to the ASCII values of 0-9 and A-F, which limits exploitation to Denial of Service.

The companion function ei_print_term, which prints directly to a FILE instead of a memory buffer, does not contain this bug.

This issue affects OTP from OTP 17.0 before OTP 29.0.2, OTP 28.5.0.2 and OTP 27.3.4.13, corresponding to erl_interface from 3.7.16 before 5.8.1, 5.7.0.1 and 5.5.2.1.

Weaknesses & attack patterns

Weakness

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

Attack patterns

CAPEC-8 · Buffer Overflow in an API Call MITRE ↗

Affected — Erlang / erl_interface Repository ↗

3.7.16 and up affected
5.5.2.1 not affected
5.7.0.1 not affected
5.8.1 not affected
every other version: unknown
default status unknown
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
modules · source files · routines
modules erl_interface
source files src/misc/ei_printterm.c
routines ei_s_print_term

Affected — GitHub / erlang/otp Repository ↗

17.0 and up affected
27.3.4.13 not affected
28.5.0.2 not affected
29.0.2 not affected
84adefa < 0bef277 affected
every other version: unknown
default status unknown
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
modules · source files · routines
modules erl_interface
source files lib/erl_interface/src/misc/ei_printterm.c
routines ei_s_print_term

Workarounds

Avoid calling ei_s_print_term with untrusted data whose encoded integer representation could exceed 2000 characters.

References

Credits

Jonatan Männchen / EEF Finder
Sverker Eriksson Remediation developer

CVSS breakdown

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