CVE-2026-93672: NULL pointer dereference in the Bluetooth host ATT request lookup (bt_att_find_req_by_user_data)
btattfindreqbyuserdata() in subsys/bluetooth/host/att.c walks every ATT channel attached to a connection and dereferences chan->req->userdata without checking chan->req. An ATT channel with no client request in flight holds chan->req == NULL — that is its normal idle state, set by atthandlersp() when a response resolves the transaction and tested by attreqsendprocess() to pick a free channel — so the lookup reads through a NULL pointer as soon as it visits an idle channel. Every other chan->req user in the file already guards the pointer.
The lookup is reached from the public btgattcancel() API and, more importantly, from the host itself: btgattunsubscribe() calls btgattcancel() while a subscribe CCC write is still outstanding (BTGATTSUBSCRIBEFLAGWRITEPENDING), and callnotifycbandmaybeunsubscribe() in subsys/bluetooth/host/gatt.c invokes btgattunsubscribe() from the RX path whenever an application notify callback returns BTGATTITERSTOP. A malicious or malfunctioning peer can hold the trigger window open by withholding the ATT Write Response to the CCC write and then sending a notification for the subscribed handle. With CONFIGBTEATT the traversal is very likely to meet an idle sibling channel, since ATT channels are prepended to the list and a channel opened after the pending request was sent is visited first.
The dereference is a read of a small constant offset from address zero, so the impact is availability only: no memory corruption, no attacker-chosen address and no information disclosure. On platforms and configurations where a near-NULL read traps — TrustZone non-secure images, MMU targets, nativesim, or builds with CONFIGNULLPOINTEREXCEPTIONDETECTIONMPU/DWT — the fault occurs in the Bluetooth RX context and results in a fatal error and device reset. On a plain Cortex-M build with the vector table mapped at address 0 and null-pointer detection disabled (the default) the read succeeds and the defect is inert.
The fix adds an explicit chan->req != NULL test to the channel traversal and additionally rejects a NULL userdata argument, which would otherwise have matched, and cancelled, an unrelated request.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In bt_att_find_req_by_user_data() in subsys/bluetooth/host/att.c, check that chan->req is not NULL before dereferencing chan->req->user_data, and reject a NULL user_data argument.
Event History
Frequently Asked Questions
What conditions are required for a peer to trigger the crash through the Bluetooth host?
The peer must be able to withhold the ATT Write Response for an outstanding subscription CCC write, then send a notification for the subscribed handle. The application notification callback must return BT_GATT_ITER_STOP, causing the host RX path to unsubscribe and cancel the pending request.
Is this limited to application use of a cancellation API?
No. Although the vulnerable lookup is reachable through the public bt_gatt_cancel() API, the host can reach it internally when bt_gatt_unsubscribe() cancels a still-pending subscription CCC write after a notification callback stops iteration.
Why can an apparently idle ATT channel cause the failure?
An ATT channel normally has chan->req set to NULL when no client request is in flight, including after a response completes a transaction. The lookup iterates attached channels and dereferences chan->req->user_data without first checking whether chan->req is NULL.