CVE-2023-35658: Use-After-Free in Bluetooth GATT

Summary

01/09/2023
Yes i
Critical
Not published

CVE-2023-35658: In gatt_process_prep_write_rsp of gatt_cl.cc, there is a possible privilege escalation due to a use after free. Affects platform/packages/modules/Bluetooth across 2 version ranges.

>= 13:0, < 13:2023-09-01 >= 13-next:0, < 13-next:2023-09-01

Fixed in 13-next:2023-09-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 Bluetooth package in the Android ecosystem is responsible for handling Bluetooth functionality on Android devices. It provides APIs and services for Bluetooth communication, including the Generic Attribute Profile (GATT) protocol. GATT is used for data exchange between Bluetooth devices, allowing them to discover and interact with each other's services and characteristics. This vulnerability affects the GATT implementation in the Bluetooth package.

Vulnerability Detail

The vulnerability, identified as CVE-2023-35658, resides in the function gatt_process_prep_write_rsp within the GATT implementation of the Bluetooth package. It is categorized as a use-after-free vulnerability. When processing a prepare write response, the function fails to properly handle memory deallocation, leading to a situation where a reference to freed memory is still accessible. An attacker within proximity of the affected device can exploit this vulnerability to escalate privileges remotely, potentially achieving code execution without requiring additional privileges or user interaction.

How To Fix

Minimum fixed version

13-next:2023-09-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

No workaround has been provided for this vulnerability. It is crucial to apply the official fix to mitigate the risk of exploitation.

Conclusion

The use-after-free vulnerability in the Bluetooth GATT implementation poses a critical security risk, allowing for remote code execution without user interaction. It is crucial to apply the provided fix to ensure the proper handling of memory within the affected function. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for platform/packages/modules/Bluetooth →

Share this vulnerability

FAQ

The vulnerability allows an attacker in close proximity to the affected device to execute arbitrary code remotely, potentially leading to a complete compromise of the device.

No, user interaction is not needed for the vulnerability to be exploited. An attacker within proximity can trigger the vulnerability without any user involvement.

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

There are no known instances of this vulnerability being exploited in the wild at the time of this report.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, including those in the Android ecosystem.

Related vulnerabilities

Recent vulnerabilities recorded for platform/packages/modules/Bluetooth.

How To Fix

Minimum fixed version

13-next:2023-09-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