🇰🇷 한글 설명
Netty의 Redis 코덱에서 maxElements 제한을 초과할 경우 기존의 부분 집계 상태가 제대로 초기화되지 않는 취약점이 발견되었습니다. 공격자는 이를 악용하여 예외 발생 후에도 제어 가능한 상태를 유지하고 풀링된 버퍼를 점유하여 메모리 자원을 고갈시킬 수 있습니다.
💡 쉬운 설명
데이터를 처리하는 과정에서 특정 규칙을 어겼을 때, 처리 중이던 데이터 찌꺼기가 메모리에 남게 되는 문제입니다. 이를 통해 공격자가 메모리를 계속 차지하게 만들어 시스템을 느리게 하거나 멈추게 할 수 있습니다.
🇺🇸 원문 (English)
Netty is an asynchronous, event-driven network application framework. Prior to 4.1.136.Final and 4.2.16.Final, the RedisArrayAggregator Redis codec clears retained partial aggregate state when the maxNestedArrayDepth limit is exceeded, but it does not clear the same state when the sibling maxElements limit is exceeded. A peer can start a valid RESP array, send a bulk string child, then send a nested array header longer than the configured maxElements. Netty throws a decoder exception in decodeRedisArrayHeader, but the existing partial aggregate remains retained in the handler. If the application leaves the channel alive after the exception, later messages are still consumed into the pre-error aggregate, allowing an unauthenticated peer to keep attacker-controlled aggregate state alive across a security-limit exception and pin retained pooled buffers. This issue is fixed in versions 4.1.136.Final and 4.2.16.Final.
📍 영향받는 시스템
Netty versions prior to 4.1.136.Final and 4.2.16.Final
⚔️ 공격 벡터
조작된 RESP 배열 헤더를 전송하여 디코딩 예외를 유도하고 메모리 내 부분 집계 상태를 유지함
🛡️ 대응 방법
Netty를 4.1.136.Final 또는 4.2.16.Final 이상의 버전으로 업데이트하십시오.
🔧 검증 코드
명령어 결과에 취약한 버전의 Netty 라이브러리가 출력되면 업데이트가 필요한 상태입니다.
mvn dependency:tree | grep -E 'netty-all|netty-buffer|netty-common' | grep -vE '4.1.136.Final|4.2.16.Final'