🇰🇷 한글 설명
Erlang/OTP의 httpc HTTP 클라이언트가 서버로부터 수신하는 응답 헤더의 전체 크기에 제한을 두지 않아 발생하는 메모리 고갈 취약점입니다. 공격자가 비정상적으로 큰 헤더를 전송할 경우 클라이언트 프로세스가 무제한으로 메모리를 할당하여 시스템 중단이나 BEAM VM 충돌을 유발할 수 있습니다.
💡 쉬운 설명
인터넷 연결 시 상대방 서버가 아주 긴 정보를 보내면, 내 컴퓨터가 이를 다 받아내려다 메모리가 꽉 차서 멈춰버리는 문제입니다. 악의적인 서버가 엄청난 양의 데이터를 보내 컴퓨터를 마비시킬 수 있습니다.
🇺🇸 원문 (English)
The Erlang/OTP httpc HTTP client does not enforce a limit on the total size of response headers received from a server. The max_header_size option defaults to nolimit, and httpc_response:parse_headers/6 accumulates every header into a list before the length check runs (which only fires after the terminating CRLF CRLF is received).
A malicious or compromised HTTP server can send an arbitrarily large number of headers, or headers with very large values, causing the client process to allocate unbounded memory until the system runs out of memory or the BEAM VM crashes. A proof-of-concept server sending 100,000 headers of roughly 4000 bytes each caused the client VM to allocate over 13 GB of memory in under 30 seconds.
Any application using httpc:request/4,5 to connect to untrusted servers is affected. No authentication is required: any server the client connects to (including via a redirect or man-in-the-middle) can trigger the exhaustion.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.17, from OTP 28.0 before OTP 28.5.0.6, and from OTP 29.0 before OTP 29.0.6, corresponding to inets from 5.10 before 9.3.2.7, from 9.4 before 9.6.2.3, and from 9.7 before 9.7.2. Whether OTP before OTP 17.0, corresponding to inets before 5.10, is affected is unknown.
📍 영향받는 시스템
OTP 17.0 ~ 27.3.4.16, 28.0 ~ 28.5.0.5, 29.0 ~ 29.0.5 (inets 5.10 ~ 9.3.2.6, 9.4 ~ 9.6.2.2, 9.7 ~ 9.7.1 포함)
⚔️ 공격 벡터
신뢰할 수 없는 서버 또는 중간자 공격(MitM)을 통해 비정상적으로 거대한 HTTP 응답 헤더를 전송하여 메모리 고갈 유도
🛡️ 대응 방법
Erlang/OTP를 최신 보안 패치 버전(OTP 27.3.4.17, 28.5.0.6, 29.0.6 이상)으로 업데이트하십시오.
🔧 검증 코드
출력된 OTP 버전이 취약 버전 범위(27.3.4.17 미만 등)에 해당하는지 확인하십시오.
erl -eval 'io:format("~s~n", [erlang:system_info(otp_release)]), halt().' -noshell
💻 영향받는 소프트웨어
IBM WebSphere Application Server