CVE-2026-10685

The Zephyr Bluetooth GATT client CCC-write response handler gatt_write_ccc_rsp() in subsys/bluetooth/host/gatt.c invoked the application's params->subscribe() callback after it had already called params->notify(conn, params, NULL, 0). Per the public GATT API, a notify callback with NULL data is the documented signal that the subscription has terminated and the bt_gatt_subscribe_params struct may be freed or reused by the application; calling subscribe() on the struct afterwards is a use-after-free, including an indirect call through the freed params->subscribe function pointer. The error branch is remotely (adjacent) reachable: a Zephyr device acting as a GATT client that calls bt_gatt_subscribe() can be driven into this ordering when a connected GATT server peer answers the CCC write with an ATT Error Response (the peer-supplied error code flows through att_error_rsp -> att_handle_rsp into gatt_write_ccc_rsp). For applications that free or recycle subscription parameters in their notification-termination handler, this results in memory corruption, a crash (denial of service), or potentially attacker-influenced control flow. The fix reorders the handler so the subscribe() callback runs before the terminating notify(NULL) in both the error and unsubscribe paths.
Configurations

Configuration 1 (hide)

cpe:2.3:o:zephyrproject:zephyr:*:*:*:*:*:*:*:*

History

23 Oct 2026, 23:10

Type Values Removed Values Added
Summary
  • (es) El gestor de respuesta de escritura CCC del cliente Zephyr Bluetooth GATT gatt_write_ccc_rsp() en subsys/bluetooth/host/gatt.c invocó la devolución de llamada params -> subscribe() de la aplicación después de haber llamado ya a params -> notify(conn, params, NULL, 0). Según la API pública de GATT, una devolución de llamada de notificación con datos NULL es la señal documentada de que la suscripción ha terminado y la estructura bt_gatt_subscribe_params puede ser liberada o reutilizada por la aplicación; llamar a subscribe() en la estructura después es un uso después de liberación, incluyendo una llamada indirecta a través del puntero de función params -> subscribe liberado. La rama de error es alcanzable remotamente (adyacente): un dispositivo Zephyr que actúa como un cliente GATT que llama a bt_gatt_subscribe() puede ser llevado a este ordenamiento cuando un par de servidor GATT conectado responde a la escritura CCC con una Respuesta de Error ATT (el código de error proporcionado por el par fluye a través de att_error_rsp -> att_handle_rsp hacia gatt_write_ccc_rsp). Para aplicaciones que liberan o reciclan parámetros de suscripción en su gestor de terminación de notificación, esto resulta en corrupción de memoria, un fallo (denegación de servicio), o un flujo de control potencialmente influenciado por el atacante. La solución reordena el gestor para que la devolución de llamada subscribe() se ejecute antes de la notificación de terminación notify(NULL) tanto en las rutas de error como de anulación de suscripción.

Information

Published : 2026-07-31 15:16

Updated : 2026-10-23 23:10


NVD link : CVE-2026-10685

Mitre link : CVE-2026-10685

CVE.ORG link : CVE-2026-10685


JSON object : View

Products Affected

zephyrproject

  • zephyr
CWE
CWE-416

Use After Free