CVE-2024-22905
📋 TL;DR
A buffer overflow vulnerability in ARM mbed-os v6.17.0 allows remote attackers to execute arbitrary code via crafted scripts targeting the hciTrSerialRxIncoming function. This affects devices using mbed-os with BLE connectivity enabled, potentially leading to complete system compromise.
💻 Affected Systems
- ARM mbed-os
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to full device compromise, data exfiltration, and persistence on affected systems.
Likely Case
Denial of service or limited code execution depending on exploit sophistication and system protections.
If Mitigated
Limited impact if proper memory protections (ASLR, DEP) are enabled and network segmentation is implemented.
🎯 Exploit Status
Exploitation requires crafting specific BLE HCI packets. No public exploit code identified in references.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Version 6.17.1 or later
Vendor Advisory: https://github.com/ARMmbed/mbed-os/issues/15462
Restart Required: Yes
Instructions:
1. Update mbed-os to version 6.17.1 or later. 2. Rebuild your application with the updated mbed-os library. 3. Deploy the updated firmware to affected devices. 4. Restart devices to apply changes.
🔧 Temporary Workarounds
Disable BLE Feature
allTemporarily disable BLE connectivity if not required, removing the attack surface.
Modify mbed_app.json to set "target.features_add": ["BLE"] to false or remove BLE from build configuration
Network Segmentation
allIsolate devices with BLE functionality from critical networks.
🧯 If You Can't Patch
- Implement strict network segmentation to isolate vulnerable devices
- Enable memory protection features (ASLR, DEP/W^X) if supported by hardware
🔍 How to Verify
Check if Vulnerable:
Check mbed-os version in your project configuration or build files. If version is exactly 6.17.0 and BLE is enabled, you are vulnerable.
Check Version:
Check mbed-os version in mbed-os.lib file or run: grep -r "MBED_OS_VERSION" in your project directory
Verify Fix Applied:
Verify mbed-os version is 6.17.1 or later and rebuild/redeploy application.
📡 Detection & Monitoring
Log Indicators:
- Unexpected device crashes or restarts
- Abnormal BLE HCI packet sizes in logs
- Memory corruption errors
Network Indicators:
- Unusual BLE traffic patterns
- Malformed HCI packets exceeding normal size limits
SIEM Query:
device_logs WHERE (message CONTAINS "hciTrSerialRxIncoming" OR message CONTAINS "buffer overflow") AND severity IN ("ERROR", "CRITICAL")
🔗 References
- https://github.com/ARMmbed/mbed-os/blob/7c7d20da6527885237094d9d50ce099404414201/connectivity/FEATURE_BLE/source/cordio/stack_adaptation/hci_tr.c#L125
- https://github.com/ARMmbed/mbed-os/blob/7c7d20da6527885237094d9d50ce099404414201/connectivity/FEATURE_BLE/source/cordio/stack_adaptation/hci_tr.c#L173-L175
- https://github.com/ARMmbed/mbed-os/issues/15462
- https://github.com/ARMmbed/mbed-os/blob/7c7d20da6527885237094d9d50ce099404414201/connectivity/FEATURE_BLE/source/cordio/stack_adaptation/hci_tr.c#L125
- https://github.com/ARMmbed/mbed-os/blob/7c7d20da6527885237094d9d50ce099404414201/connectivity/FEATURE_BLE/source/cordio/stack_adaptation/hci_tr.c#L173-L175
- https://github.com/ARMmbed/mbed-os/issues/15462