Уязвимость переполнения целых чисел (обертывания или переноса) в erlang otp erlang/otp (модули erts), erlang otp erts (модули erts) допускает принудительное переполнение целых чисел и избыточное выделение. Данная уязвимость связана с программными файлами erts/emulator/beam/external.c, emulator/beam/external.c. Обработчик тега BIT_BINARY_EXT (77) в декодере внешнего формата терминов (ETF) принимает кодировку, в которой поля длины и конечных битов установлены в ноль.
Последующее вычисление размера битовой строки приводит к опустошению целого числа без знака, создавая значение примерно 2^64, которое затем передается как размер выделенной памяти. Распределитель прерывает работу всего узла с сообщением типа «Невозможно выделить 2305843009213693951 байт памяти (двоичного типа)». Сбой — это прерывание работы на уровне виртуальной машины, а не исключение на уровне Erlang.
Его нельзя перехватить деревьями контроля, try/catch или передачей опции [safe] вbinary_to_term/2 (которая ограничивает только создание атомов и не выполняет структурную проверку двоичных кодировок). Любое приложение, которое декодирует ETF из ненадежных источников с помощьюbinary_to_term/1,2 или enif_binary_to_term(), подвергается риску. Протокол распространения Erlang также декодирует входящие термины по тому же пути кода, но ожидается, что распространение будет осуществляться в доверенных сетях в соответствии с Руководством по безопасному кодированию OTP (DSG-011).
Эта проблема затрагивает OTP от OTP 27.0 до OTP 29.0.4, OTP 28.5.0.4 и OTP 27.3.4.15, что соответствует ert от 15.0 до 17.0.4, 16.4.0.4 и 15.2.7.11.
Показать оригинальное описание (EN)
Integer Underflow (Wrap or Wraparound) vulnerability in erlang otp erlang/otp (erts modules), erlang otp erts (erts modules) allows Forced Integer Overflow, Excessive Allocation. This vulnerability is associated with program files erts/emulator/beam/external.c, emulator/beam/external.c. The BIT_BINARY_EXT tag (77) handler in the External Term Format (ETF) decoder accepts an encoding with both length and trailing-bits fields set to zero. The subsequent computation of the bitstring size underflows an unsigned integer, producing a value of roughly 2^64 that is then passed as a memory allocation size. The allocator aborts the entire node with a message such as "Cannot allocate 2305843009213693951 bytes of memory (of type binary)". The crash is a VM-level abort, not an Erlang-level exception. It cannot be intercepted by supervision trees, by try/catch, or by passing the [safe] option to binary_to_term/2 (which only restricts atom creation and does not perform structural validation of binary encodings). Any application that decodes ETF from untrusted sources via binary_to_term/1,2 or enif_binary_to_term() is exposed. The Erlang distribution protocol also decodes incoming terms through the same code path, but distribution is expected to run on trusted networks per the OTP Secure Coding Guidelines (DSG-011). This issue affects OTP from OTP 27.0 before OTP 29.0.4, OTP 28.5.0.4 and OTP 27.3.4.15, corresponding to erts from 15.0 before 17.0.4, 16.4.0.4 and 15.2.7.11.
Характеристики атаки
Последствия
Строка CVSS v4.0
Тип уязвимости (CWE)
Уязвимые продукты 6
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Erlang Erlang\/Otp
cpe:2.3:a:erlang:erlang\/otp:*:*:*:*:*:*:*:*
|
27.0
|
27.3.4.15
|
|
Erlang Erlang\/Otp
cpe:2.3:a:erlang:erlang\/otp:*:*:*:*:*:*:*:*
|
28.0
|
28.5.0.4
|
|
Erlang Erlang\/Otp
cpe:2.3:a:erlang:erlang\/otp:*:*:*:*:*:*:*:*
|
29.0
|
29.0.4
|
|
Erlang Erts
cpe:2.3:a:erlang:erts:*:*:*:*:*:*:*:*
|
15.0
|
15.2.7.11
|
|
Erlang Erts
cpe:2.3:a:erlang:erts:*:*:*:*:*:*:*:*
|
16.0
|
16.4.0.4
|
|
Erlang Erts
cpe:2.3:a:erlang:erts:*:*:*:*:*:*:*:*
|
17.0
|
17.0.4
|