public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v2 0/1] Fix use-after-free in BAP broadcast cleanup
@ 2026-02-14 15:36 Sarveshwar Bajaj
  2026-02-14 15:36 ` [PATCH BlueZ v2 1/1] bap: Fix use-after-free in broadcast sink cleanup Sarveshwar Bajaj
  2026-02-17 14:50 ` [PATCH BlueZ v2 0/1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 4+ messages in thread
From: Sarveshwar Bajaj @ 2026-02-14 15:36 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz
  Cc: vinit.mehta, sarveshwar.bajaj, devyani.godbole

This fixes a use-after-free crash when broadcast audio sources
disconnect or undergo RPA rotation as reported in issue #1866.

The crash occurs because bap_data_free() was freeing streams before
destroying the broadcast sink setups that still held references to them.

Tested with AddressSanitizer on latest 6.19 kernel with NXPs
controller as broadcast sink and Samsung S23 broadcast source.
No crashes observed with disconnect or RPA rotation after fix.

Changes in v2:
- Use safe cleanup pattern to avoid nested queue operations (Pauli Virtanen)
- Apply fix to both bap_bcast_remove() and bap_bcast_disconnect()

Sarveshwar Bajaj (1):
  bap: Fix use-after-free in broadcast sink cleanup

 profiles/audio/bap.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

-- 
2.51.0


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

end of thread, other threads:[~2026-02-17 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-14 15:36 [PATCH BlueZ v2 0/1] Fix use-after-free in BAP broadcast cleanup Sarveshwar Bajaj
2026-02-14 15:36 ` [PATCH BlueZ v2 1/1] bap: Fix use-after-free in broadcast sink cleanup Sarveshwar Bajaj
2026-02-14 16:34   ` Fix use-after-free in BAP broadcast cleanup bluez.test.bot
2026-02-17 14:50 ` [PATCH BlueZ v2 0/1] " 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