CVE-2024-0040: Heap-buffer-overflow in android::MtpPacket::copyFrom

platform/frameworks/av Updated 02 Oct 2025

Summary

01/02/2024
Yes i
High
Not published

CVE-2024-0040: In setParameter of MtpPacket.cpp, there is a possible out of bounds read due to a heap buffer overflow. Affects platform/frameworks/av across 6 version ranges.

>= 11:0, < 11:2024-02-01 >= 12:0, < 12:2024-02-01 >= 12L:0, < 12L:2024-02-01 >= 13:0, < 13:2024-02-01 >= 14:0, < 14:2024-02-01 >= 14-next:0, < 14-next:2024-02-01

Fixed in 14-next:2024-02-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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The package under scrutiny is platform/frameworks/av, which is part of the Android ecosystem. This package is responsible for handling audio and video functionality in the Android operating system. It provides various APIs and components for media playback, recording, and streaming. The vulnerability affects the MtpPacket.cpp file within the package, specifically in the setParameter function. This function is responsible for setting parameters for MTP (Media Transfer Protocol) packets. MTP is a protocol used for transferring media files between devices, such as smartphones and computers.

Vulnerability Detail

The vulnerability in question is a heap buffer overflow in the copyFrom function of the android::MtpPacket class. This vulnerability allows for an out-of-bounds read, potentially leading to remote information disclosure. The issue arises due to improper bounds checking when copying data from one MTP packet to another. An attacker could exploit this vulnerability to read sensitive information from the heap memory, without requiring any additional execution privileges or user interaction.

How To Fix

Minimum fixed version

14-next:2024-02-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 →

Workaround

There is no specific workaround mentioned for this vulnerability.

Conclusion

In conclusion, the platform/frameworks/av package in the Android ecosystem is vulnerable to a heap buffer overflow in the android::MtpPacket::copyFrom function. This vulnerability allows for remote information disclosure without requiring any additional execution privileges or user interaction. It is crucial to update the package to the latest version and apply the provided fix to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for platform/frameworks/av →

Share this vulnerability

FAQ

The vulnerability allows for remote information disclosure, potentially exposing sensitive data to attackers.

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

The vulnerability affects Android versions 11, 12, 12L, 13, and 14.

The recommended mitigation is to update the platform/frameworks/av package to the latest version.

You can find more information about this vulnerability in the ASB-A-300007708.json file available at the following source: https://storage.googleapis.com/android-osv/ASB-A-300007708.json

Related vulnerabilities

Recent vulnerabilities recorded for platform/frameworks/av.

How To Fix

Minimum fixed version

14-next:2024-02-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