🇰🇷 한글 설명
Apache bRPC 1.18.0 미만 버전의 mcpack2pb 컴포넌트에서 제어되지 않는 재귀 호출로 인해 발생하는 취약점입니다. 공격자가 깊게 중첩된 mcpack 데이터를 전송하면 서버의 스택 오버플로를 유발하여 프로세스를 중단시킬 수 있습니다.
💡 쉬운 설명
데이터 안에 데이터가 끝없이 반복되는 구조를 보내 서버를 혼란에 빠뜨리는 공격입니다. 이로 인해 서버가 처리 한계를 넘어서며 갑자기 꺼질 수 있습니다.
🇺🇸 원문 (English)
Uncontrolled recursion in the mcpack2pb component in Apache bRPC (version < 1.18.0) on all platforms allows remote attackers to make the server crash via sending deeply nested mcpack data.
Root Cause:
The bRPC mcpack2pb parser (used to serve nshead_mcpack / ubrpc / public_pbrpc requests) recursively parses nested objects and arrays without any depth limit. For a protobuf message that references itself (e.g. a repeated message field), the generated parser recurses once per nesting level of the incoming mcpack object. A deeply nested request makes the recursion grow unbounded, overflow the stack and crash the process.
Affected Scenarios:
Use bRPC server with a recursive-schema protobuf message to serve nshead_mcpack / ubrpc / public_pbrpc requests from untrusted network.
How to Fix:
(Choose one of the following options)
1. Upgrade bRPC to version 1.18.0, which fixes this issue.
2. Apply this patch: https://github.com/apache/brpc/pull/3499
Note:
No matter which option you choose, you should know that the fix enforces the documented parsing depth limit MAX_DEPTH (128) on the parse path, the same limit the serializer already applies. If your requests contain mcpack messages nested deeper than 128 levels, the request will be failed after applying the fix.
📍 영향받는 시스템
Apache bRPC version < 1.18.0
⚔️ 공격 벡터
신뢰할 수 없는 네트워크를 통해 깊게 중첩된 mcpack 데이터를 전송하여 서버를 크래시시킴
🛡️ 대응 방법
bRPC를 1.18.0 버전으로 업그레이드하거나 제공된 패치를 적용하십시오.
🔧 검증 코드
출력된 버전이 1.18.0 미만인 경우 해당 취약점에 노출된 상태입니다.
brpc_version_command_placeholder 2>/dev/null | grep -E '1\.[0-9]+\.[0-9]+'