CVE-2019-13916 in WICED Studioinfo

Summary

by MITRE

An issue was discovered in Cypress (formerly Broadcom) WICED Studio 6.2 CYW20735B1 and CYW20819A1. As a Bluetooth Low Energy (BLE) packet is received, it is copied into a Heap (ThreadX Block) buffer. The buffer allocated in dhmulp_getRxBuffer is four bytes too small to hold the maximum of 255 bytes plus headers. It is possible to corrupt a pointer in the linked list holding the free buffers of the g_mm_BLEDeviceToHostPool Block pool. This pointer can be fully controlled by overflowing with 3 bytes of packet data and the first byte of the packet CRC checksum. The checksum can be freely chosen by adapting the packet data accordingly. An attacker might be able to allocate the overwritten address as a receive buffer resulting in a write-what-where condition. This is fixed in BT SDK2.4 and BT SDK2.45.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 05/18/2024

The vulnerability CVE-2019-13916 represents a critical heap-based buffer overflow in Cypress WICED Studio 6.2 firmware versions affecting CYW20735B1 and CYW20819A1 Bluetooth Low Energy chips. This issue stems from improper memory management during BLE packet processing where the system allocates a buffer that is precisely four bytes smaller than required for maximum packet size. The flaw occurs within the dhmulp_getRxBuffer function which handles incoming BLE packets by copying them into heap-allocated ThreadX Block buffers. The buffer size calculation fails to account for the maximum 255-byte payload plus necessary headers, creating a predictable overflow condition that can be exploited by malicious actors.

The technical exploitation of this vulnerability leverages the specific memory layout of the g_mm_BLEDeviceToHostPool Block pool structure, which maintains a linked list of free buffers. When a malformed BLE packet is received, the overflow corrupts the pointer field within this linked list structure. The attacker can control the overflow through packet data manipulation, specifically using three bytes of packet content and the first byte of the packet CRC checksum. Since the CRC checksum is directly controllable by adjusting packet data, an attacker can precisely craft a packet that overflows the buffer and modifies the linked list pointer to point to a desired memory location. This manipulation creates a write-what-where condition that fundamentally undermines the system's memory safety model.

The operational impact of this vulnerability extends beyond simple memory corruption, as it provides attackers with potential for arbitrary code execution and system compromise. The write-what-where condition enables attackers to overwrite critical data structures, function pointers, or even code sections within the BLE stack, potentially allowing for privilege escalation or complete system takeover. This vulnerability affects embedded IoT devices and wireless communication systems that rely on these specific Cypress chipsets, making it particularly dangerous in environments where wireless security is paramount. The exploitation requires proximity to the target device due to the nature of BLE communication but can be executed without requiring physical access or complex setup.

Security mitigations for this vulnerability include upgrading to Bluetooth SDK versions 2.4 or 2.45, which contain fixed buffer allocation logic and proper bounds checking. Organizations should implement comprehensive firmware update strategies for all affected devices, particularly those deployed in security-sensitive environments. The vulnerability aligns with CWE-121, heap-based buffer overflow, and can be mapped to ATT&CK technique T1059.007 for command and scripting interpreter usage in exploitation scenarios. Network monitoring solutions should be enhanced to detect anomalous BLE packet patterns that might indicate exploitation attempts, while device manufacturers should implement stricter input validation and memory management practices in their wireless communication stacks to prevent similar issues in future implementations.

Reservation

07/18/2019

Moderation

accepted

CPE

ready

EPSS

0.01207

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!