🇰🇷 한글 설명
Apache bRPC 1.18.0 미만 버전의 AMF 파서에서 제어되지 않는 재귀 호출이 발생하여 원격 RTMP 피어가 깊게 중첩된 AMF 객체나 배열을 전송할 경우 bRPC 프로세스가 충돌할 수 있습니다. 파서가 중첩 깊이 제한 없이 재귀적으로 처리하기 때문에 네이티브 스택이 고갈될 수 있는 취약점입니다.
💡 쉬운 설명
악의적인 사용자가 아주 복잡하게 꼬인 데이터를 보내면 프로그램이 이를 처리하다가 과부하로 인해 갑자기 꺼져버리는 문제입니다. 마치 끝없이 반복되는 질문을 던져서 상대방을 정신 못 차리게 만드는 것과 비슷합니다.
🇺🇸 원문 (English)
Uncontrolled recursion in the AMF parser in Apache bRPC < 1.18.0 allows a remote RTMP peer to crash a bRPC process by sending deeply nested AMF objects or arrays. The parser recursively processed nested AMF containers without enforcing a depth limit, which could exhaust the native stack.
Affected Scenarios:
Applications using bRPC RTMP support and parsing AMF data from an untrusted RTMP peer. This includes RTMP servers parsing client command messages, RTMP clients parsing server responses or status messages, and either side parsing inbound AMF script data such as metadata or cue points. Direct callers of ReadAMFObject or ReadAMFArray on untrusted input are also affected.
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:
The fix introduces a configurable AMF nesting depth limit with default value 128. AMF objects or arrays deeper than amf_max_depth are rejected after applying the fix.
📍 영향받는 시스템
Apache bRPC < 1.18.0 (RTMP 지원 및 AMF 파싱 사용 시)
⚔️ 공격 벡터
원격의 RTMP 피어가 깊게 중첩된 AMF 객체 또는 배열을 전송하여 스택 고갈 유도
🛡️ 대응 방법
Apache bRPC를 1.18.0 이상으로 업그레이드하거나 관련 패치(PR #3344)를 적용하십시오.
🔧 검증 코드
명령어 결과에 1.18.0 이상의 버전이 출력되면 취약점이 해결된 상태입니다.
brpc --version 2>/dev/null | grep -E '1\.18\.0'