🇰🇷 한글 설명
Apache bRPC 1.18.0 미만 버전의 RTMP 프로토콜 구성 요소에서 힙 Use-After-Free 취약점이 발견되었습니다. 공격자가 조작된 Abort 제어 메시지를 전송하면 인증 없이도 bRPC RTMP 서버를 충돌시켜 서비스 거부(DoS)를 유발할 수 있습니다.
💡 쉬운 설명
서버가 처리 중인 데이터를 갑자기 삭제해버리는 오류로 인해 서버가 멈출 수 있는 문제입니다. 해커가 특수한 메시지를 보내면 서버를 강제로 종료시킬 수 있습니다.
🇺🇸 원문 (English)
A heap use-after-free in the RTMP protocol component of Apache bRPC (versions < 1.18.0) allows a remote attacker to crash a bRPC RTMP server by sending a crafted Abort control message. No authentication or application-level request is required.
Root Cause:
When an RTMP Abort control message names the chunk stream that is currently being parsed (the chunk stream carrying the message itself), RtmpChunkStream::OnAbortMessage calls RtmpContext::ClearChunkStream, which deletes the RtmpChunkStream while its Feed() is still running. After the message handler returns, Feed() continues to access members of the deleted object, resulting in a heap-use-after-free.
Affected Scenarios:
bRPC servers that enable RTMP support (ServerOptions.rtmp_service set) and accept connections from untrusted networks.
How to Fix:
1. Upgrade bRPC to version 1.18.0, which fixes this issue.
2. Apply this patch: https://github.com/apache/brpc/pull/3452
The fix skips clearing the chunk stream when the Abort message targets the chunk stream that is currently being parsed.
📍 영향받는 시스템
Apache bRPC versions < 1.18.0 (RTMP 서비스 활성화 시)
⚔️ 공격 벡터
조작된 RTMP Abort 제어 메시지를 전송하여 원격에서 서버 충돌 유도
🛡️ 대응 방법
bRPC를 1.18.0 버전 이상으로 업그레이드하거나 제공된 패치를 적용하십시오.
🔧 검증 코드
출력된 버전이 1.18.0 미만인 경우 해당 취약점에 노출된 상태입니다.
brpc_version_check=$(brpc_version_command_here 2>/dev/null); echo $brpc_version_check | grep -E '1\.[0-9]{2}\.'