Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/2] a2dp: Fix crashes around pending SetConfiguration
@ 2026-10-01 14:34 Eduardo Alves
  2026-10-01 14:34 ` [PATCH BlueZ 1/2] a2dp: Fix UAF after rejected SetConfiguration Eduardo Alves
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Eduardo Alves @ 2026-10-01 14:34 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Eduardo Alves

bluetoothd 5.87 segfaulted in auto_config() with a G06-BT headset while
WirePlumber 0.5.17 was stuck and its SetConfiguration calls ended in
NoReply: the AVDTP channel went away while the reply was pending, and
the reply then ran auto_config() with a NULL session.

Patch 2 fixes that crash and removes the MediaTransport created for the
aborted request, so the next connection works. Patch 1 is an older,
independent bug found while testing it: a rejected SetConfiguration
leaves a dangling a2dp_stream on sep->streams, which ASAN reports as a
use-after-free once the stream is configured again on the same session.

Both were reproduced with test-functional (two VMs over btvirt, ASAN)
using a MediaEndpoint1 that delays, never sends or rejects its
SetConfiguration reply; master fails all three cases, the series passes
them. The reproducer test is available if you want it.

Eduardo Alves (2):
  a2dp: Fix UAF after rejected SetConfiguration
  a2dp: Fix crash on NULL session in auto_config

 profiles/audio/a2dp.c  | 39 ++++++++++++++++++++++++++++++++++++++-
 profiles/audio/media.c | 10 ++++++++++
 2 files changed, 48 insertions(+), 1 deletion(-)

-- 
2.56.0


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

end of thread, other threads:[~2026-10-08 15:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01 14:34 [PATCH BlueZ 0/2] a2dp: Fix crashes around pending SetConfiguration Eduardo Alves
2026-10-01 14:34 ` [PATCH BlueZ 1/2] a2dp: Fix UAF after rejected SetConfiguration Eduardo Alves
2026-10-01 16:48   ` a2dp: Fix crashes around pending SetConfiguration bluez.test.bot
2026-10-01 14:34 ` [PATCH BlueZ 2/2] a2dp: Fix crash on NULL session in auto_config Eduardo Alves
2026-10-08 15:00 ` [PATCH BlueZ 0/2] a2dp: Fix crashes around pending SetConfiguration patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox