🇰🇷 한글 설명
Apache bRPC 1.18.0 미만 버전의 Redis 응답 파서에서 제어되지 않는 재귀 호출 문제가 발생합니다. 공격자가 깊게 중첩된 RESP 배열 응답을 보내면 bRPC Redis 클라이언트 프로세스가 충돌할 수 있습니다.
💡 쉬운 설명
Redis 서버가 아주 복잡하게 꼬인 데이터를 보내면, 이를 읽으려던 프로그램이 과부하로 인해 갑자기 꺼지는 문제입니다. 이를 방지하기 위해 데이터의 깊이를 제한하는 기능이 추가되었습니다.
🇺🇸 원문 (English)
Uncontrolled recursion in the Redis reply parser in Apache bRPC < 1.18.0 allows a remote Redis server peer to crash a bRPC Redis client process by returning a deeply nested RESP array reply. The parser recursed once for each nested array level without enforcing a depth limit. The fix adds a configurable Redis reply depth limit with default value 128 and rejects replies exceeding that limit.
Affected Scenarios:
Applications using bRPC as a Redis client with ChannelOptions.protocol="redis" and receiving replies from an untrusted or faulty Redis server peer.
How to Fix:
1. Upgrade Apache bRPC to 1.18.0.
2. Apply the patch from PR https://github.com/apache/brpc/pull/3344 .
Note:
After applying the fix, Redis replies with array nesting deeper than redis_max_reply_depth are rejected.
📍 영향받는 시스템
Apache bRPC < 1.18.0 (ChannelOptions.protocol="redis" 사용 시)
⚔️ 공격 벡터
신뢰할 수 없거나 결함이 있는 Redis 서버가 깊게 중첩된 RESP 배열 응답을 전송하여 클라이언트를 충돌시킴
🛡️ 대응 방법
Apache bRPC를 1.18.0 버전으로 업그레이드하거나 관련 PR 패치를 적용하십시오.
🔧 검증 코드
출력된 버전이 1.18.0 미만이면 취약한 상태이며, 1.18.0 이상이어야 안전합니다.
brpc_version_check=$(pkg-config --modversion brpc 2>/dev/null || echo 'unknown'); echo $brpc_version_check