All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/2] Fix use-after-free in GATT client discovery
@ 2026-09-30  9:39 Gianluca Altomani
  2026-09-30  9:39 ` [PATCH BlueZ 1/2] shared/gatt-db: Always notify service removal Gianluca Altomani
  2026-09-30  9:39 ` [PATCH BlueZ 2/2] shared/gatt-client: Fix double-queued service Gianluca Altomani
  0 siblings, 2 replies; 4+ messages in thread
From: Gianluca Altomani @ 2026-09-30  9:39 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Gianluca Altomani

bluetoothd crashes in discovery_op_complete() when a discovery of a
connected peer's GATT database is cut short, e.g. because the link
drops mid-discovery. Two separate bugs leave a freed service in the
discovery's pending_svcs queue, and each patch fixes one of them.

It reproduces by connecting over LE, reading one characteristic and
disconnecting about once a second, with a peer that answers the
remote's GATT discovery. Each connection is short enough that the
remote's discovery of the peer is still running when the link drops.
On 5.72 bluetoothd crashed on the 15th connection in 4 runs out of 4.
With both patches it survived 381 connections in a row. On 5.83, 50
such connections crashed the unpatched daemon within the first minute
and pass with both patches.

Gianluca Altomani (2):
  shared/gatt-db: Always notify service removal
  shared/gatt-client: Fix double-queued service

 src/shared/gatt-client.c | 10 ++++++++--
 src/shared/gatt-db.c     |  9 +++++++--
 2 files changed, 15 insertions(+), 4 deletions(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-30 15:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-30  9:39 [PATCH BlueZ 0/2] Fix use-after-free in GATT client discovery Gianluca Altomani
2026-09-30  9:39 ` [PATCH BlueZ 1/2] shared/gatt-db: Always notify service removal Gianluca Altomani
2026-09-30 15:13   ` Fix use-after-free in GATT client discovery bluez.test.bot
2026-09-30  9:39 ` [PATCH BlueZ 2/2] shared/gatt-client: Fix double-queued service Gianluca Altomani

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.