* [bluez/bluez] d01616: gatt-client: Fix use-after-free caused by reentran...
@ 2026-04-30 19:45 BluezTestBot
0 siblings, 0 replies; only message in thread
From: BluezTestBot @ 2026-04-30 19:45 UTC (permalink / raw)
To: linux-bluetooth
Branch: refs/heads/master
Home: https://github.com/bluez/bluez
Commit: d01616f0c276a441dad8afe4e8f7bb261b26ba0a
https://github.com/bluez/bluez/commit/d01616f0c276a441dad8afe4e8f7bb261b26ba0a
Author: Jinwang Li <jinwang.li@oss.qualcomm.com>
Date: 2026-04-30 (Thu, 30 Apr 2026)
Changed paths:
M src/gatt-client.c
Log Message:
-----------
gatt-client: Fix use-after-free caused by reentrant client teardown
btd_gatt_client_service_removed() can be called reentrantly via
bt_gatt_client_unref() after the services queue has already been freed,
resulting in a use-after-free.
Reset client->ready to false before destroying the services queue to
prevent reentrant calls from dereferencing freed memory.
This was found with the following backtrace:
#0 match_service_handle ()
#1 queue_remove_if ()
#2 queue_remove_all ()
#3 btd_gatt_client_service_removed ()
#4 gatt_service_removed ()
#5 handle_notify ()
#6 queue_foreach ()
#7 notify_service_changed ()
#8 gatt_db_service_destroy ()
#9 queue_remove_all ()
#10 gatt_db_clear_range ()
#11 service_changed_failure ()
#12 discovery_op_unref ()
#13 bt_gatt_request_unref ()
#14 bt_gatt_client_cancel_all ()
#15 bt_gatt_client_free ()
#16 bt_gatt_client_unref ()
#17 bt_gatt_client_free ()
#18 bt_gatt_client_unref ()
#19 btd_gatt_client_destroy ()
#20 device_free ()
To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-30 19:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-30 19:45 [bluez/bluez] d01616: gatt-client: Fix use-after-free caused by reentran BluezTestBot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox