Затрагивает Erlang OTP httpd с 18.1.4 до 27.3.4.17 и inets с 6.0.3 до 9.3.2.7, когда некорректный размер чанка приходит отдельной записью после заголовков. Исправлено в 27.3.4.17 и 9.3.2.7.
Отказ в обслуживании: повторяющиеся запросы занимают всех доступных рабочих процессов httpd, отказывая в обслуживании легитимным клиентам.
Исправлено в версиях: 9.3.2.727.3.4.17
Обходной путь: Установите minimum_bytes_per_second в конфигурации httpd, например, в 200, что включает периодическую проверку скорости передачи байтов, которая разрывает зависшие соединения.
| inets | с 6.0.3 → исправлено в 9.3.2.7 |
| otp | с 18.1.4 → исправлено в 27.3.4.17 |
Все, кто использует Erlang/OTP inets httpd с OTP 18.1.4 до исправленных выпусков, особенно если недоверенные клиенты могут обращаться к серверу.
Строка с некорректным размером чанка, отправленная отдельной записью после заголовков, оставляет рабочий процесс запроса httpd в бесконечном ожидании. Повторение запроса через разные соединения может занять всех доступных рабочих процессов и привести к отказу в обслуживании легитимных клиентов.
В рекомендации указаны OTP с 18.1.4 до 27.3.4.17, 28.5.0.6 и 29.0.6, а также inets с 6.0.3 до 9.3.2.7, 9.6.2.3 и 9.7.2. Для эксплуатации также требуется, чтобы строка с некорректным размером чанка пришла отдельной записью от заголовков.
Оригинальный заголовок: httpd parks a request worker indefinitely on a malformed chunk size sent after the headers
Missing Release of Resource after Effective Lifetime vulnerability in Erlang/OTP inets httpd allows an unauthenticated remote attacker to cause denial of service by sending a request with a chunked body whose chunk-size line is not a hexadecimal number. The worker serving the connection is never released and no timeout reclaims it, so repeating the request across connections occupies every available worker and denies service to legitimate clients. No authentication is required and the default configuration is affected. The chunk-size line must arrive in a write separate from the headers. When the body accompanies the headers, httpd_request_handler:handle_body/3 calls http_chunk:decode/3 inside a try ... catch throw:Error, so the {error, {chunk_size, _}} thrown by http_chunk:decode_size/4 is answered with 400 Bad Request. When the chunk size arrives later, the decoder is resumed through a bare catch in httpd_request_handler:handle_info/2, which converts the throw into a return value rather than raising it; the resulting error tuple is then treated as the next decoder continuation, the socket is re-armed, and the worker waits for data that never comes. The request timeout has already been cancelled at the point the headers were accepted, and the periodic byte-rate check is only armed when minimum_bytes_per_second is configured, which it is not by default. This issue affects OTP from OTP 18.1.4 before OTP 27.3.4.17, OTP 28.5.0.6, and OTP 29.0.6, corresponding to inets from 6.0.3 before 9.3.2.7, 9.6.2.3, and 9.7.2.