Отказ в обслуживании: удалённый злоумышленник может занимать рабочие слоты httpd и блокировать легитимных клиентов
Исправлено в версиях: 9.3.2.727.3.4.17
Обходной путь: Установите minimum_bytes_per_second в конфигурации httpd, например {minimum_bytes_per_second, 200}, чтобы активировать проверку скорости передачи байтов, которая разрывает зависшие соединения.
| inets | с 5.10 → исправлено в 9.3.2.7 |
| otp | с 17.0 → исправлено в 27.3.4.17 |
Команды, использующие HTTP-серверы inets Erlang/OTP с версий OTP 17.0 до исправленных выпусков 27.3.4.17, 28.5.0.6 или 29.0.6
httpd не применяет тайм-аут при получении тела запроса. Клиент, отправляющий корректные заголовки с большим Content-Length и затем зависающий, удерживает рабочий слот занятым, что может блокировать легитимных клиентов.
В рекомендации указано, что проблема затрагивает OTP с версии 17.0 до исправленных выпусков 27.3.4.17, 28.5.0.6 и 29.0.6. Периодическая проверка скорости передачи байтов активируется только при настройке minimum_bytes_per_second, и по умолчанию она отключена, поэтому проверьте используемую версию OTP и наличие этого параметра в конфигурации httpd.
Оригинальный заголовок: httpd applies no timeout while receiving a request body, parking a worker on a stalled client
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 valid request headers with a large Content-Length and then stalling before the body is complete. httpd_request_handler:handle_info/2 cancels the request timeout as soon as a parse step succeeds, which includes the headers, and the clause that handles a decoder asking for more data re-arms the socket with {active, once} without setting any further timer. httpd_request:whole_body/2 returns such a continuation whenever the bytes received are fewer than the announced Content-Length, so a well-formed request that stops mid-body leaves the worker waiting indefinitely. The periodic byte-rate check that would reclaim it is armed only when minimum_bytes_per_second is configured, which it is not by default. Repeating this across connections occupies every worker permitted by max_clients and denies service to legitimate clients at negligible bandwidth cost. This issue affects OTP from OTP 17.0 before OTP 27.3.4.17, OTP 28.5.0.6, and OTP 29.0.6, corresponding to inets from 5.10 before 9.3.2.7, 9.6.2.3, and 9.7.2. Whether OTP before OTP 17.0, corresponding to inets before 5.10, is affected is unknown.