🇰🇷 한글 설명
Netty의 SslClientHelloHandler는 최대 길도 제한 없이 TLS ClientHello 길이에 따라 메모리를 즉시 할당하여 DoS 취약점이 발생합니다. maxClientHelloLength가 0일 경우 보호 장치가 비활성화되어 대용량 요청 시 메모리 고갈을 유발할 수 있습니다.
💡 쉬운 설명
네트워크 프레임워크 Netty에서 악의적으로 큰 데이터를 보내면 서버 메모리를 모두 차지해 서비스를 마비시킬 수 있는 결함이 있습니다. 이 문제를 해결하려면 최신 버전으로 업데이트해야 합니다.
🇺🇸 원문 (English)
Netty is a network application framework for development of protocol servers and clients. Prior to versions 4.1.135.Final and 4.2.15.Final, SslClientHelloHandler.decode() reads the 24-bit TLS handshake length and, when the ClientHello does not fit in the first record, eagerly allocates `ctx.alloc().buffer(handshakeLength)` (line 161). The guard at line 140 is `handshakeLength > maxClientHelloLength && maxClientHelloLength != 0`, and the commonly-used SniHandler/AbstractSniHandler constructors (SniHandler(Mapping), SniHandler(AsyncMapping), AbstractSniHandler()) pass maxClientHelloLength=0 and handshakeTimeoutMillis=0, so the length guard is disabled and no timeout is scheduled. A 16 MiB request exceeds the default pooled chunk size and becomes a huge/unpooled allocation performed immediately. The buffer is retained in the handler until the channel closes. Versions 4.1.135.Final and 4.2.15.Final patch the issue.
📍 영향받는 시스템
Netty 4.1.135.Final 미만 및 4.2.15.Final 미만
⚔️ 공격 벡터
악의적으로 큰 TLS ClientHello 패킷을 전송하여 서버 메모리를 고갈시킴
🛡️ 대응 방법
Netty를 4.1.135.Final 또는 4.2.15.Final 이상으로 업그레이드
🔧 검증 코드
출력된 Netty 버전이 4.1.135.Final 또는 4.2.15.Final 이상인지 확인
mvn dependency:tree | grep netty