🇰🇷 한글 설명
Netty의 codec-haproxy 모듈 내 HAProxyMessageDecoder에서 프로토콜 버전을 감지할 때 13번째 바이트를 처리하는 과정에서 부호 확장 오류가 발생합니다. 특정 바이너리 데이터가 입력될 경우 데이터가 계속 누적되어 메모리가 무한정 사용됨으로써 시스템의 직접 메모리가 고갈될 수 있습니다.
💡 쉬운 설명
특수한 형태의 네트워크 데이터가 들어오면 프로그램이 이를 처리하지 못하고 메모리를 계속해서 잡아먹는 현상이 발생합니다. 이로 인해 서버의 메모리가 가득 차서 시스템이 멈추거나 다운될 수 있습니다.
🇺🇸 원문 (English)
Netty is a network application framework for development of protocol servers and clients. In versions 4.2.0.Final up to (but not including) 4.2.16.Final, and 4.1.0.Final up to (but not including) 4.1.135, the `HAProxyMessageDecoder` in Netty's `codec-haproxy` module performs protocol version detection by reading the 13th byte as a signed Java `byte` and widening it to `int` without masking; a PROXY protocol v2 binary prefix followed by version byte `0xFF` sign-extends to `-1`, collides with the decoder's need-more-data sentinel, and causes `ByteToMessageDecoder` to accumulate inbound bytes in an unbounded `cumulation` buffer until direct memory is exhausted. This issue is fixed in versions 4.1.136.Final and 4.2.16.Final.
📍 영향받는 시스템
Netty 4.1.0.Final ~ 4.1.134.Final, 4.2.0.Final ~ 4.2.15.Final
⚔️ 공격 벡터
조작된 PROXY protocol v2 바이너리 데이터를 전송하여 메모리 고갈 유도
🛡️ 대응 방법
Netty 버전을 4.1.136.Final 또는 4.2.16.Final 이상으로 업데이트
🔧 검증 코드
명령어 결과에 취약한 버전 범위의 netty-codec-haproxy가 나타나면 해당 버전이 설치되어 있는 상태입니다.
mvn dependency:list | grep -E 'netty-codec-haproxy:[[:space:]]+(4\[\.[0-1]\.[0-9]{2,3]\.Final|4\.2\.[0-1][0-5]\.Final)'
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
💻 영향받는 소프트웨어
IBM WebSphere Application Server