🇰🇷 한글 설명
Apache bRPC 1.18.0 미만 버전에서 WITH_THRIFT 옵션으로 빌드된 Thrift 클라이언트는, 연결된 서버가 형식이 잘못된 T_EXCEPTION 응답을 보내면 예외를 처리하지 못해 프로세스 전체가 std::terminate()로 종료될 수 있습니다. 이 옵션은 기본적으로 비활성화되어 있습니다. 공격자가 신뢰되지 않은 서버 측에 위치할 경우 발생할 수 있는 서비스 거부(DoS) 취약점입니다.
💡 쉬운 설명
bRPC를 특정 옵션(Thrift)으로 빌드해 사용하는 클라이언트는, 연결된 서버가 잘못된 오류 응답을 보내면 프로그램 전체가 강제 종료될 수 있습니다. 해당 옵션을 쓰지 않으면 영향을 받지 않습니다.
🇺🇸 원문 (English)
A Thrift client in Apache bRPC (version < 1.18.0, built with WITH_THRIFT which is off by default) can be crashed by the server peer it talks to. When the server returns a T_EXCEPTION reply whose exception struct is malformed, the client decodes it without catching what Apache Thrift throws (TProtocolException, TTransportException or std::length_error). The exception unwinds out of the bthread task function and the process calls std::terminate(), terminating the whole process along with every other in-flight RPC.
This is the client response path, so the adversary is the server peer, which THREAT_MODEL.md treats as untrusted. It requires a WITH_THRIFT build (off by default).
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/3500
📍 영향받는 시스템
Apache bRPC 1.18.0 미만, WITH_THRIFT 옵션으로 빌드된 클라이언트
⚔️ 공격 벡터
악의적이거나 침해된 서버가 형식이 잘못된 T_EXCEPTION 응답을 전송하여 클라이언트 프로세스를 충돌시킴
🛡️ 대응 방법
bRPC를 1.18.0 이상으로 업그레이드하거나 PR #3500 패치를 적용
🔧 검증 코드
결과에 WITH_THRIFT=ON이 표시되면 Thrift 옵션으로 빌드된 것이므로 bRPC 버전을 확인해 1.18.0 미만이면 즉시 업그레이드해야 하며, 결과가 없거나 OFF이면 이 취약점의 영향을 받지 않습니다.
grep -i thrift $(find / -name 'CMakeCache.txt' 2>/dev/null | grep -i brpc | head -1) 2>/dev/null