flawopen.com/보안 사고/ANGLE 범용 제로데이: Chrome, iOS, Android 동시 침해

ANGLE 범용 제로데이: Chrome, iOS, Android 동시 침해

치명적 · CVSS 8.8 CWE-125 / CWE-787: 메모리 경계 초과 접근 사고 분석 · 2025년 12월
쉽게 설명하기 (ELI5)

경쟁 관계인 두 스마트폰 제조사(구글과 애플)가 개발 비용을 아끼기 위해 동일한 규격 변환 어댑터(ANGLE)를 기기 내부에 설치했다고 상상해보세요. 해커가 웹사이트를 통해 변환기에 과부하를 주는 신호를 보내 장치를 태워버렸고, 결과적으로 단 하나의 공격 코드로 아이폰과 안드로이드폰을 동시에 해킹했습니다.

이 페이지의 주요 용어
ANGLE (Almost Native Graphics Layer Engine)
An open-source library created by Google that translates standard WebGL and OpenGL ES commands into hardware-native APIs: Metal on Apple devices, Direct3D on Windows, and Vulkan on Android and Linux.
shared monoculture vulnerability
A critical security flaw in a shared open-source foundation library that bypasses vendor platform boundaries, exposing competing operating systems to the identical exploit.
Metal backend depth texture conversion
The specific subsystem in ANGLE on Apple platforms that converts raw WebGL depth pixel buffers into Metal-compatible GPU texture slices.
WebGL memory corruption
Exploiting browser memory safety bugs through standard, unprivileged JavaScript Canvas 3D API calls without requiring browser plugins or special permissions.

사고 개요

In December 2025, Google and Apple issued rare, synchronized emergency security advisories for a high-severity zero-day vulnerability tracked as CVE-2025-14174. The vulnerability was discovered by Google's Threat Analysis Group (TAG) and Apple's Security Engineering and Architecture (SEAR) team being actively exploited in targeted in-the-wild cyber espionage campaigns.

Unlike conventional browser zero-days that target V8 (Chrome) or JavaScriptCore (Safari), CVE-2025-14174 originated in ANGLE (Almost Native Graphics Layer Engine). Because Google maintains ANGLE for Chromium and Apple integrates ANGLE into WebKit for WebGL translation on iOS and iPadOS, this single memory corruption bug compromised both browser ecosystems simultaneously.

An attacker hosting a malicious web page could trigger an out-of-bounds memory write simply by rendering a WebGL canvas with specially crafted depth texture parameters, gaining arbitrary code execution within the browser's sandboxed renderer process on both Android/Chrome and iOS/Safari.

기술적 근본 원인

1. Arithmetic Overflow in Depth Texture Slice Calculation

When uploading 3D or 2D depth textures via WebGL (texImage2D / texSubImage2D), ANGLE's Metal backend calculated the required staging buffer size based on width, height, and depth. Due to improper bounds validation during pixel format conversion (from WebGL depth formats like DEPTH_COMPONENT32F to Metal's MTLPixelFormatDepth32Float), the row pitch calculation under-allocated memory while the copy routine processed the full input buffer, writing past the heap boundary.

2. Shared Library Dependency Across Competing Vendors

Apple adopted Google's ANGLE to accelerate WebGL compliance without maintaining a separate translation layer from scratch. This created a shared software monoculture: an exploit payload weaponized against ANGLE on Chrome was instantly portable to Apple's WebKit WebContent process on iOS and iPadOS.

3. WebGL Direct Surface Exposure to Untrusted Web Pages

WebGL exposes direct GPU memory management primitives (buffers, textures, shaders) to arbitrary JavaScript execution. Because WebGL is enabled by default across all mobile browsers and requires zero user prompts, any visited web link can immediately interact with complex C++ graphics drivers.

취약한 구현 vs 강화된 버퍼 계산

VULNERABLE: UNVALIDATED TEXTURE BUFFER ALLOCATION (ANGLE)
// Conceptual flaw in ANGLE's Metal backend (TextureMtl.mm)
angle::Result TextureMtl::uploadDepthData(const gl::Context *context,
                                         const gl::Extents &size,
                                         const uint8_t *clientData) {
  // Bug: Row pitch multiplication lacks overflow checks
  size_t rowPitch = size.width * getBytesPerPixel(mFormat);
  size_t allocationSize = rowPitch * size.height; // Can overflow!

  // Under-allocated heap buffer
  uint8_t *stagingBuffer = new uint8_t[allocationSize];

  // HEAP OUT-OF-BOUNDS WRITE:
  // Metal copy helper copies bytes calculated from internal format stride!
  CopyDepthSlices(clientData, stagingBuffer, size.width, size.height, size.depth);
  return angle::Result::Continue;
}
HARDENED: CHECKED ARITHMETIC & BOUNDS CLAMPING
// Fixed ANGLE implementation using base::CheckedNumeric
angle::Result TextureMtl::uploadDepthData(const gl::Context *context,
                                         const gl::Extents &size,
                                         const uint8_t *clientData) {
  // Fix 1: Safe integer multiplication preventing integer overflow
  base::CheckedNumeric<size_t> safeSize = size.width;
  safeSize *= getBytesPerPixel(mFormat);
  safeSize *= size.height;
  safeSize *= size.depth;

  if (!safeSize.IsValid()) {
    return angle::Result::Stop; // Reject invalid buffer geometry
  }

  size_t allocationSize = safeSize.ValueOrDie();
  std::vector<uint8_t> stagingBuffer(allocationSize);

  // Fix 2: Bounded copy strictly constrained to allocated buffer capacity
  SafeCopyDepthSlices(clientData, stagingBuffer.data(), stagingBuffer.size(), size);
  return angle::Result::Continue;
}

탐지 및 보안 제어 정책

# Network IDS / Zeek: Flag suspicious WebGL depth texture exploit payloads event http_reply(c: connection, msg: http_message) { if (msg$body matches /texImage2D.*DEPTH_COMPONENT/) ... } # Safari / Chrome Enterprise Policy: Disable WebGL for high-security endpoints defaults write com.apple.Safari WebKitPreferences.webGLEnabled -bool false # Chrome Enterprise Policy: Enforce software fallback or block WebGL on untrusted origins {"Disable3DAPIs": true, "WebGLBlockedForOrigins": ["*"]}
In high-threat environments (journalists, government officials, defense personnel), enforce Apple's Lockdown Mode or Chrome's Disable3DAPIs policy to completely eliminate the WebGL/ANGLE attack surface.

소프트웨어 공급망 교훈 및 체크리스트

출처 및 공식 권고 링크