🇰🇷 한글 설명
Envoy의 TCP StatsD sink(TcpStatsdSink)에서 통계 이름이 16KiB를 초과할 경우 스레드 로컬 플러셔 버퍼가 오버플로되는 취약점이 존재합니다. 공격자가 매우 긴 요청 경로를 포함한 HTTP 또는 gRPC 요청을 보내면 힙 쓰기 오버플로가 발생하여 서비스 거부(DoS) 또는 원격 코드 실행(RCE)이 가능합니다.
💡 쉬운 설명
Envoy라는 프로그램이 통계 데이터를 기록할 때, 너무 긴 이름이 들어오면 메모리 공간을 넘쳐흐르게 만드는 버그가 있습니다. 이를 이용해 공격자가 비정상적으로 긴 데이터를 보내면 프로그램이 멈추거나 해커가 시스템을 제어할 수 있습니다.
🇺🇸 원문 (English)
Envoy is an open source edge and service proxy designed for cloud-native applications. From 1.34.0 until 1.35.13, 1.36.9, 1.37.5, and 1.38.3, a vulnerability exists in Envoy's TCP StatsD sink (TcpStatsdSink), where the thread-local flusher buffer can be overflowed by exceptionally long statistic names (e.g., >16KiB). During formatting, TcpStatsdSink reserves a single contiguous memory slice of 16KiB (FLUSH_SLICE_SIZE_BYTES). If formatting a single metric exceeds the remaining capacity, the flusher initiates a buffer rotation but incorrectly continues to allocate another fixed 16KiB slice. If an attacker can trigger a statistic name longer than 16KiB—for example, by sending an HTTP or gRPC request with an extremely long request path (:path) that is recorded by the grpc_stats filter configured with stats_for_all_methods: true—the flusher will attempt to copy the metric name using memcpy operations beyond the allocated heap buffer boundaries. This leads to a heap write overflow, which can cause immediate denial-of-service (process crash) or potential remote code execution (RCE). This vulnerability is fixed in 1.35.13, 1.36.9, 1.37.5, and 1.38.3.
📍 영향받는 시스템
Envoy 1.34.0 ~ 1.35.12, 1.36.0 ~ 1.36.8, 1.37.0 ~ 1.37.4, 1.38.0 ~ 1.38.2
⚔️ 공격 벡터
grpc_stats 필터가 활성화된 상태에서 매우 긴 :path를 포함한 HTTP/gRPC 요청 전송
🛡️ 대응 방법
Envoy를 최신 보안 패치 버전(1.35.13, 1.36.9, 1.37.5, 1.38.3 이상)으로 업데이트
🔧 검증 코드
출력된 버전이 취약한 범위(1.35.13, 1.36.9, 1.37.5, 1.38.3 미만)에 해당하면 취약한 상태입니다.
envoy --version 2>/dev/null | grep -E 'v(1\.34\.[0-9]+|1\.35\.[0-9]+|1\.36\.[0-9]+|1\.37\.[0-9]+|1\.38\.[0-9]+)'