VYPR
Unrated severityNVD Advisory· Published Nov 20, 2024· Updated Nov 25, 2024

CVE-2024-48985

CVE-2024-48985

Description

An issue was discovered in MBed OS 6.16.0. During processing of HCI packets, the software dynamically determines the length of the packet data by reading 2 bytes from the packet data. A buffer is then allocated to contain the entire packet, the size of which is calculated as the length of the packet body determined earlier and the header length. If the allocate fails because the specified packet is too large, no exception handling occurs and hciTrSerialRxIncoming continues to write bytes into the 4-byte large temporary header buffer, leading to a buffer overflow. This can be leveraged into an arbitrary write by an attacker. It is possible to overwrite the pointer to the buffer that is supposed to receive the contents of the packet body but which couldn't be allocated. One can then overwrite the state variable used by the function to determine which step of the parsing process is currently being executed. This advances the function to the next state, where it proceeds to copy data to that arbitrary location. The packet body is then written wherever the corrupted data pointer is pointing.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A buffer overflow in MBed OS 6.16.0's HCI packet processing allows arbitrary write via crafted packets.

Vulnerability

In MBed OS 6.16.0, the HCI packet processing function hciTrSerialRxIncoming in connectivity/FEATURE_BLE/source/cordio/stack_adaptation/hci_tr.c [1] dynamically determines the packet body length by reading 2 bytes from the packet data. A buffer is allocated to hold the entire packet, with size calculated as the header length plus the body length. If the allocation fails because the packet is too large, no exception handling occurs, and the function continues to write incoming bytes into a 4-byte temporary header buffer, causing a buffer overflow.

Exploitation

An attacker must be able to send crafted HCI packets to the device (e.g., via BLE proximity or local access). The attacker sends an oversized HCI packet that triggers a failed memory allocation. The overflow allows overwriting the pointer to the intended packet body buffer (which was not allocated) and the state variable that controls the parsing state machine. This advances the function to the next state, where it copies the packet body to the arbitrary location pointed to by the corrupted pointer.

Impact

Successful exploitation results in an arbitrary write primitive. The attacker can write controlled data to any memory location, potentially leading to code execution, privilege escalation, or denial of service within the BLE stack context.

Mitigation

The vulnerability is fixed in pull request #384 [2], which was merged on November 19, 2024. Users should update to a version of MBed OS that includes this fix (e.g., after commit 54e8693). No workaround is available; devices running MBed OS 6.16.0 are vulnerable until patched.

AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2
  • MBed OS/MBed OSdescription
  • Arm/Mbed OSllm-create
    Range: = 6.16.0

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

2

News mentions

0

No linked articles in our index yet.