CVE-2022-20416: Out of Bounds Write in audioProfileToHal Function in HidlUtils.cpp in android.hardware.audio.common@7.0-util

platform/hardware/interfaces Updated 02 Oct 2025

Summary

01/10/2022
Yes i
High
Not published

CVE-2022-20416: In audioTransportsToHal of HidlUtils.cpp, there is a possible out of bounds write due to an incorrect bounds check. Affects platform/hardware/interfaces across 3 version ranges.

>= 12:0, < 12:2022-10-01 >= 12L:0, < 12L:2022-10-01 >= 13:0, < 13:2022-10-01

Fixed in 12:2022-10-01. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The package under scrutiny is platform/hardware/interfaces in the Android ecosystem. This package provides a set of hardware interfaces for various components in the Android system. It includes definitions and utilities for audio-related functionality. The vulnerability affects the audioProfileToHal function in the HidlUtils.cpp file. This function is responsible for converting audio profiles to the Hardware Abstraction Layer (HAL) format. The vulnerability arises from an incorrect bounds check in the audioTransportsToHal function, leading to an out of bounds write. This vulnerability can be exploited locally to escalate privileges without requiring additional execution privileges. User interaction is not necessary for exploitation.

Vulnerability Detail

The vulnerability in the audioProfileToHal function in HidlUtils.cpp is due to an incorrect bounds check in the audioTransportsToHal function. This allows an attacker to write data outside the bounds of an array, potentially leading to a local escalation of privilege. The impact of this vulnerability is high, as it can be exploited without user interaction and can result in privilege escalation. The vulnerability was introduced in version 12 of the platform/hardware/interfaces package and was fixed in version 12 released on October 1, 2022. It was also introduced in version 12L and fixed in version 12L released on the same date. Additionally, it was introduced in version 13 and fixed in version 13 released on October 1, 2022.

How To Fix

Minimum fixed version

12:2022-10-01

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

The vulnerability in the audioProfileToHal function in HidlUtils.cpp can lead to a local escalation of privilege in the Android ecosystem. It is crucial to update the platform/hardware/interfaces package to the fixed versions to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for platform/hardware/interfaces →

Share this vulnerability

FAQ

This vulnerability allows an attacker to write data outside the bounds of an array, potentially leading to a local escalation of privilege. It can be exploited without user interaction and can result in privilege escalation.

No, user interaction is not required for exploitation of this vulnerability.

Versions 12, 12L, and 13 of the platform/hardware/interfaces package are affected by this vulnerability.

The vulnerability was introduced in version 12 and fixed in version 12 released on October 1, 2022. It was also introduced in version 12L and fixed in version 12L released on the same date. Additionally, it was introduced in version 13 and fixed in version 13 released on October 1, 2022.

To mitigate this vulnerability, it is recommended to update the platform/hardware/interfaces package to the fixed versions mentioned in the 'how_to_fix' section.

Related vulnerabilities

Recent vulnerabilities recorded for platform/hardware/interfaces.

How To Fix

Minimum fixed version

12:2022-10-01

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback