CVE-2026-77684: Bluetooth Classic HFP Hands-Free: TX buffer leak on RFCOMM disconnect leads to permanent Bluetooth denial of service
The Bluetooth Classic Hands-Free Profile HF role in subsys/bluetooth/host/classic/hfphf.c does not release the AT command buffers that are still queued on hf->txpending when the RFCOMM DLC goes down. hfphfdisconnected() 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 hfpool (CONFIGBTMAXCONN + 1 buffers, i.e. two in the default configuration). The same function also left BTHFPHFFLAGCONNECTED set, and hfphfcreate() wiped the object with memset() as soon as hf->acl was NULL, without checking whether hf->work, hf->slcwork or hf->deferredwork 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 bcshandle() call bthfphfselectcodec() and queue an AT+BCS buffer, which cannot be transmitted while BTHFPHFFLAGRXONGOING is set, and an immediately following RFCOMM DISC strands that buffer. Repeating the connect / +BCS / disconnect cycle a couple of times empties hfpool for good.
With the pool exhausted, HFP command sending fails permanently, and because hfphfsendcmd() allocates with KFOREVER (btrfcommcreatepdu() → btconncreatepdu()) from the Bluetooth RX context — where that timeout is not downgraded to KNOWAIT — one further +BCS from the peer parks the Bluetooth RX thread inside netbufalloc() 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 kwork 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 CONFIGBTHFPHF enabled.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed?
Deployments using Zephyr's Bluetooth Classic Hands-Free Profile Hands-Free role are affected. The fixed hf_pool contains CONFIG_BT_MAX_CONN + 1 buffers; the default configuration has two buffers.
What does an attacker need to trigger the condition?
A remote Audio Gateway peer can drive the sequence without application involvement or user interaction. It sends an unsolicited +BCS: 1 response, causing an AT+BCS buffer to be queued, then immediately disconnects the RFCOMM DLC.
How quickly can the buffer pool be exhausted?
Repeating the connect, +BCS, and disconnect cycle a couple of times can permanently empty hf_pool. This is especially rapid with the default two-buffer pool.
What operational symptom indicates that a device has been affected?
HFP command sending fails permanently once the pool is exhausted. The queued buffers are not released through another code path after the disconnect.