CVE-2026-77684
Received Received - Intake

Memory Leak in Zephyr RTOS Bluetooth HFP HF Role

Vulnerability report for CVE-2026-77684, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-19

Last updated on: 2026-10-19

Assigner: Zephyr Project

Description

The Bluetooth Classic Hands-Free Profile HF role in subsys/bluetooth/host/classic/hfp_hf.c does not release the AT command buffers that are still queued on hf->tx_pending when the RFCOMM DLC goes down. hfp_hf_disconnected() only cancelled the work items and cleared hf->acl, and no other code path ever dequeues those buffers, so each one is permanently lost from the fixed hf_pool (CONFIG_BT_MAX_CONN + 1 buffers, i.e. two in the default configuration). The same function also left BT_HFP_HF_FLAG_CONNECTED set, and hfp_hf_create() wiped the object with memset() as soon as hf->acl was NULL, without checking whether hf->work, hf->slc_work or hf->deferred_work was still pending or running. The remote Audio Gateway peer controls the trigger end to end and needs no application involvement: an unsolicited +BCS: 1 response makes bcs_handle() call bt_hfp_hf_select_codec() and queue an AT+BCS buffer, which cannot be transmitted while BT_HFP_HF_FLAG_RX_ONGOING is set, and an immediately following RFCOMM DISC strands that buffer. Repeating the connect / +BCS / disconnect cycle a couple of times empties hf_pool for good. With the pool exhausted, HFP command sending fails permanently, and because hfp_hf_send_cmd() allocates with K_FOREVER (bt_rfcomm_create_pdu() β†’ bt_conn_create_pdu()) from the Bluetooth RX context β€” where that timeout is not downgraded to K_NO_WAIT β€” one further +BCS from the peer parks the Bluetooth RX thread inside net_buf_alloc() with no possible waker, halting all HCI event processing until the device is rebooted. Separately, reusing the HF slot while a work handler was still queued or running allowed memset() to wipe live k_work items out from under the system workqueue, corrupting shared kernel workqueue state. Exploitation requires an established HFP session (for SSP devices L2CAP enforces authentication before the RFCOMM channel is reachable) and a build with CONFIG_BT_HFP_HF enabled.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-19
Last Modified
2026-10-19
Generated
2026-10-20
AI Q&A
2026-10-20
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
zephyrproject zephyr 4.2.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-401 The product does not sufficiently track and release allocated memory after it has been used, making the memory unavailable for reallocation and reuse.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is in the Bluetooth Classic Hands-Free Profile (HFP) HF role of the Zephyr RTOS. It occurs when the RFCOMM DLC disconnects but the AT command buffers remain queued in memory. The system fails to release these buffers, permanently consuming them from a fixed pool. Repeated connect/disconnect cycles with specific codec responses can exhaust the buffer pool, causing command failures and system hangs.

Detection Guidance

This vulnerability is specific to Zephyr RTOS Bluetooth Classic HFP HF role and requires deep kernel-level inspection. Detection involves checking for buffer exhaustion in hf_pool, stalled Bluetooth RX threads, or corrupted workqueue state. No standard network commands apply; monitor Zephyr RTOS logs for HFP-related errors or thread hangs.

Impact Analysis

The vulnerability can cause Bluetooth HFP functionality to fail permanently after repeated attacks. It may also crash the Bluetooth RX thread, halting all HCI event processing until a reboot. Additionally, it risks corrupting kernel workqueue state if work handlers are overwritten.

Mitigation Strategies

Disable CONFIG_BT_HFP_HF in your Zephyr RTOS build configuration. Apply patches from Zephyr Project if available. Monitor for HFP session disconnections and reboot if Bluetooth RX thread hangs are detected. Ensure SSP authentication is enforced for HFP sessions.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-77684. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart