Am I affected?

type your inets version to check

Description

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.

Weaknesses & attack patterns

Weakness

CWE-772 · Missing Release of Resource after Effective Lifetime in catalog → MITRE ↗

Attack patterns

CAPEC-469 · HTTP DoS MITRE ↗

Affected — Erlang / inets Repository ↗

≥ 5.10 and up affected
→ 9.3.2.7 not affected
→ 9.6.2.3 not affected
→ 9.7.2 not affected
every other version: unknown
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
version type otp
modules · source files · routines
modules httpd_request_handler · httpd_request
source files src/http_server/httpd_request_handler.erl · src/http_server/httpd_request.erl
routines httpd_request_handler:handle_info/2 · httpd_request_handler:cancel_request_timeout/1 · httpd_request:whole_body/2

Affected — Erlang

≥ 17.0 and up affected
→ 27.3.4.17 not affected
→ 28.5.0.6 not affected
→ 29.0.6 not affected
every other version: unknown
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
version type otp
modules · source files · routines
modules httpd_request_handler · httpd_request
source files lib/inets/src/http_server/httpd_request_handler.erl · lib/inets/src/http_server/httpd_request.erl
routines httpd_request_handler:handle_info/2 · httpd_request_handler:cancel_request_timeout/1 · httpd_request:whole_body/2

Affected — GitHub / erlang/otp Repository ↗

≥ 84adefa < 81b453a affected
≥ 81b453a and up not affected
every other version: unknown
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
version type git
modules · source files · routines
modules httpd_request_handler · httpd_request
source files lib/inets/src/http_server/httpd_request_handler.erl · lib/inets/src/http_server/httpd_request.erl
routines httpd_request_handler:handle_info/2 · httpd_request_handler:cancel_request_timeout/1 · httpd_request:whole_body/2

Workarounds

  • Set minimum_bytes_per_second in the httpd configuration, for example {minimum_bytes_per_second, 200}. This arms a periodic byte-rate check that terminates a connection which has stopped delivering data, reclaiming the parked worker. The check is disabled by default.
  • Place a reverse proxy in front of httpd that enforces its own body-read timeout, such as client_body_timeout in nginx.
  • Restrict access to the server to trusted clients where the deployment allows it.

References

Credits

Lukas Backström / Erlang Solutions Analyst
Konrad Pietrzak / Ericsson Remediation developer

CVSS breakdown

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

Exploitability

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None

Vulnerable System

Confidentiality
None
Integrity
None
Availability
High

Subsequent Systems

Confidentiality
None
Integrity
None
Availability
None
« All CVEs