flawopen.com/घटनाएं/ANGLE यूनिवर्सल जीरो-डे अटैक (Chrome, iOS और Android)

ANGLE यूनिवर्सल जीरो-डे अटैक (Chrome, iOS और Android)

गंभीर · CVSS 8.8 CWE-125 / CWE-787: बाउंड्स से बाहर मेमोरी एक्सेस घटना विश्लेषण · दिसंबर 2025
सरल भाषा में समझें (ELI5)

कल्पना कीजिए कि दो प्रतिद्वंद्वी फोन कंपनियां (गूगल और ऐप्पल) हैं। दोनों ने अपनी लागत बचाने के लिए फोन के अंदर एक ही जैसा पावर एडेप्टर (ANGLE) लगाया, जो बाहरी बिजली (WebGL) को फोन की बैटरी (Metal/Vulkan) के अनुकूल बदलता है। एक हैकर ने वेबसाइट पर एक खास तरह का सिग्नल भेजा जिससे दोनों फोन का वह एडेप्टर ओवरहीट होकर पिघल गया, और हैकर ने एक ही कोड से iPhone और Android दोनों फोन हैक कर लिए।

इस पृष्ठ के महत्वपूर्ण शब्द
ANGLE ग्राफिक्स इंजन
गूगल द्वारा बनाई गई ओपन-सोर्स लाइब्रेरी जो WebGL कमांड को Apple Metal या Vulkan में बदलती है।
साझा सॉफ्टवेयर निर्भरता
जब दो अलग-अलग ऑपरेटिंग सिस्टम एक ही थर्ड-पार्टी कोड पर निर्भर होते हैं, जिससे एक ही बग दोनों को प्रभावित करता है।
डेप्थ टेक्सचर बफर आवंटन
3D ग्राफिक्स बनाते समय मेमोरी में पिक्सल डेटा स्टोर करने की प्रक्रिया।
WebGL मेमोरी करप्शन
बिना किसी परमिशन के साधारण वेब पेज से ब्राउज़र की मेमोरी में छेड़छाड़ करने का हमला।

घटना का संक्षिप्त विवरण

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.

असुरक्षित बनाम सुरक्षित कोड आर्किटेक्चर

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.

सप्लाई चेन सबक और रोकथाम चेकलिस्ट

स्रोत और आधिकारिक लिंक