CVE-2026-10685: use-after-free in zephyrproject zephyr
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.
AI Analysis
Technical Summary
The Zephyr Bluetooth GATT client contains a use-after-free vulnerability in the gatt_write_ccc_rsp() function located in subsys/bluetooth/host/gatt.c. This function improperly invokes the application's params->subscribe() callback after it has already called params->notify(conn, params, NULL, 0), which per the public GATT API signals subscription termination and allows the bt_gatt_subscribe_params struct to be freed or reused. Calling subscribe() afterward results in a use-after-free, including an indirect call through a freed function pointer. This error path can be triggered remotely when a Zephyr device acting as a GATT client receives an ATT Error Response from a connected GATT server peer during a CCC write operation. The consequence for applications that free or recycle subscription parameters in their notification-termination handler includes memory corruption, denial of service via crash, or potentially attacker-influenced control flow. The fix involves reordering the handler so that the subscribe() callback runs before the terminating notify(NULL) callback in both error and unsubscribe paths.
Potential Impact
This vulnerability can lead to memory corruption and application crashes (denial of service) on affected Zephyr devices acting as Bluetooth GATT clients. There is also potential for attacker-influenced control flow, which could lead to further exploitation depending on the application context. The issue arises from a use-after-free condition triggered by a remote GATT server sending an ATT Error Response during subscription. No known exploits are reported in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability fix involves reordering the callback invocation sequence in the gatt_write_ccc_rsp() handler. Until an official fix is available, applications should avoid freeing or recycling subscription parameters in their notification-termination handlers or implement defensive programming to prevent use-after-free conditions. Monitor the Zephyr project advisories for updates and apply official patches once released.
CVE-2026-10685: use-after-free in zephyrproject zephyr
Description
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.
CVSS v3.1
Score 7.6high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Zephyr Bluetooth GATT client contains a use-after-free vulnerability in the gatt_write_ccc_rsp() function located in subsys/bluetooth/host/gatt.c. This function improperly invokes the application's params->subscribe() callback after it has already called params->notify(conn, params, NULL, 0), which per the public GATT API signals subscription termination and allows the bt_gatt_subscribe_params struct to be freed or reused. Calling subscribe() afterward results in a use-after-free, including an indirect call through a freed function pointer. This error path can be triggered remotely when a Zephyr device acting as a GATT client receives an ATT Error Response from a connected GATT server peer during a CCC write operation. The consequence for applications that free or recycle subscription parameters in their notification-termination handler includes memory corruption, denial of service via crash, or potentially attacker-influenced control flow. The fix involves reordering the handler so that the subscribe() callback runs before the terminating notify(NULL) callback in both error and unsubscribe paths.
Potential Impact
This vulnerability can lead to memory corruption and application crashes (denial of service) on affected Zephyr devices acting as Bluetooth GATT clients. There is also potential for attacker-influenced control flow, which could lead to further exploitation depending on the application context. The issue arises from a use-after-free condition triggered by a remote GATT server sending an ATT Error Response during subscription. No known exploits are reported in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability fix involves reordering the callback invocation sequence in the gatt_write_ccc_rsp() handler. Until an official fix is available, applications should avoid freeing or recycling subscription parameters in their notification-termination handlers or implement defensive programming to prevent use-after-free conditions. Monitor the Zephyr project advisories for updates and apply official patches once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- zephyr
- Date Reserved
- 2026-06-02T15:26:22.870Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a6cb6c9b597da70a83dffb3
Added to database: 07/31/2026, 14:52:57 UTC
Last enriched: 07/31/2026, 15:07:25 UTC
Last updated: 07/31/2026, 15:34:06 UTC
Views: 14
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.