Уязвимость Out-of-bounds Read во внешнем декодере формата терминов в Erlang OTP эртах позволяет злоумышленнику, управляющему входом в binary_to_term/1,2, считывать память после ввода и изменять один байт там, через FLOAT_EXT член без конечного нулевого байта. decoded_size в erts/emulator/beam/external.c проверяет только то, что 31 байт поля FLOAT_EXT присутствует. dec_term затем передает поле в sys_chars_to_double, которое сканирует до NUL на длину. Когда поле не имеет NUL, сканирование продолжается в байты после поля, и эти байты изменяют декодированный поплавок. Когда после поля найден символ radix, а strtod не принимает его, sys_chars_to_double перезаписывает этот байт (a, становится a).
VM может ошибиться, если сканирование достигает неотображенной страницы. Безопасная опция не препятствует этому. enif_binary_to_term() и протокол распространения достигают одного и того же декодера, и предполагается, что распространение выполняется только в доверенных сетях. Запись ограничена одним радикс-байтом.
Не было показано произвольного написания или выполнения кода. Эта проблема затрагивает OTP от OTP 17.0 до OTP 27.3.4.20, OTP 28.5.0.9 и OTP 29.1.3, что соответствует эртам от 6.0 до 15.2.7.15, 16.4.0.8 и 17.1.2. Затрагивается ли OTP до OTP 17.0, что соответствует эртам до 6.0, неизвестно.
Показать оригинальное описание (EN)
Out-of-bounds Read vulnerability in the external term format decoder in Erlang OTP erts allows an attacker who controls the input to binary_to_term/1,2 to read memory after the input, and to change one byte there, via a FLOAT_EXT term without a terminating zero byte. decoded_size in erts/emulator/beam/external.c checks only that the 31 bytes of the FLOAT_EXT field are present. dec_term then passes the field to sys_chars_to_double, which scans to a NUL byte without a length limit. When the field has no NUL, the scan continues into the bytes after the field, and those bytes change the decoded float. When the radix character is found after the field and strtod does not accept it, sys_chars_to_double overwrites that byte (a , becomes a .). The VM can fault if the scan reaches an unmapped page. The safe option does not prevent this. enif_binary_to_term() and the distribution protocol reach the same decoder, and distribution is assumed to run on trusted networks only. The write is limited to the one radix byte. No arbitrary write or code execution was shown. This issue affects OTP from OTP 17.0 before OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3, corresponding to erts from 6.0 before 15.2.7.15, 16.4.0.8, and 17.1.2. Whether OTP before OTP 17.0, corresponding to erts before 6.0, is affected is unknown.
Характеристики атаки
Последствия
Строка CVSS v4.0