Skip to main content
CVE Vulnerability Database

CVE-2024-0023: Google Android Privilege Escalation Flaw

CVE-2024-0023 is a privilege escalation vulnerability in Google Android affecting Codec2BufferUtils.cpp. An out of bounds write flaw allows local attackers to gain elevated privileges. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

CVE-2024-0023 Overview

CVE-2024-0023 is an out-of-bounds write vulnerability in the Android media codec framework. The flaw resides in the ConvertRGBToPlanarYUV function of Codec2BufferUtils.cpp, where an incorrect bounds check permits memory writes beyond the intended buffer boundary. Successful exploitation leads to local privilege escalation without requiring additional execution privileges or user interaction. The vulnerability affects Android versions 11 through 14 and is tracked under [CWE-787: Out-of-bounds Write].

Critical Impact

Local attackers with low privileges can escalate to higher privileges on affected Android devices through the media codec subsystem without any user interaction.

Affected Products

  • Google Android 11.0
  • Google Android 12.0 and 12.1
  • Google Android 13.0 and 14.0

Discovery Timeline

Technical Details for CVE-2024-0023

Vulnerability Analysis

The vulnerability affects the ConvertRGBToPlanarYUV routine inside Codec2BufferUtils.cpp, part of the Android media framework used to convert RGB pixel data into planar YUV format for codec processing. The function performs a bounds check before writing converted pixel data into the destination buffer. Due to an incorrect calculation, the check fails to account for the full range of memory the conversion routine will touch. An attacker who supplies crafted media parameters can cause the routine to write past the allocated buffer.

Because the media codec service runs with elevated privileges relative to a typical application, corrupting adjacent memory in this context enables privilege escalation. The issue is categorized under [CWE-787: Out-of-bounds Write], a class of memory corruption weaknesses that continues to rank among the most exploited on Android.

Root Cause

The root cause is an incorrect bounds check in the pixel format conversion path. The validation logic does not correctly compute the required destination buffer size for all input dimensions and stride combinations. As a result, the loop that writes planar YUV samples proceeds past the allocated region.

Attack Vector

Exploitation is local. A malicious application installed on the device can pass crafted media buffers to the codec framework and trigger the flawed conversion routine. No user interaction is required. Because the codec service processes untrusted media data with system-level privileges, the out-of-bounds write can be leveraged to corrupt sensitive memory structures and gain privileges beyond those held by the calling app.

No verified public exploit code is currently associated with this CVE. Technical details of the fix are available in the Android platform source commit.

Detection Methods for CVE-2024-0023

Indicators of Compromise

  • Unexpected crashes or tombstones in the mediacodec or codec2 processes on Android devices, particularly those referencing Codec2BufferUtils or ConvertRGBToPlanarYUV.
  • Applications repeatedly invoking media codec APIs with unusual RGB frame dimensions or stride values.
  • Installation of untrusted APKs shortly before media-service crashes appear in device logs.

Detection Strategies

  • Review Android logcat and tombstone files for SIGSEGV or SIGABRT signals originating in the codec2 shared library.
  • Enforce Android security patch level checks in enterprise mobility management (EMM) tooling to identify devices below the January 2024 patch level.
  • Monitor application behavior for anomalous native crashes tied to media processing pipelines.

Monitoring Recommendations

  • Ingest mobile device telemetry, including patch level and crash reports, into a centralized log analytics platform.
  • Flag devices running Android 11 through 14 that have not received the 2024-01-01 or later security patch level.
  • Track sideloaded applications and correlate their installation with media-service crash events.

How to Mitigate CVE-2024-0023

Immediate Actions Required

  • Apply the Android security patch level 2024-01-01 or later to all affected devices.
  • Prioritize patch deployment for Android 11 through 14 devices under EMM management.
  • Restrict installation of applications from untrusted sources on managed fleets.

Patch Information

Google fixed the vulnerability in the January 2024 Android security bulletin. The source-level correction is available in the Android platform commit 30b1b34c. Device manufacturers ship the fix as part of the security patch level dated 2024-01-01. Consult the Android Security Bulletin January 2024 for the full advisory.

Workarounds

  • Disable installation of untrusted or sideloaded applications through EMM policy until patches are applied.
  • Limit exposure of vulnerable devices to untrusted media content and third-party media processing apps.
  • Enforce Google Play Protect and equivalent runtime application scanning on managed devices.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.