Commit: c7071911d57aa684f86f9458e33dfd9abb809c50
Parent: 48a69222581c604916e18285298cf9b13db1c7d8
Author: Vlad Pruteanu <vlad.pruteanu@nxp.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-04-24 17:32:44
Tree: 5152581e56b9e9c63ffda4958ab92443ebc24801

bap: Remove deleted devices from pa_req queue The bap_bcast_remove function has been updated to remove from the pa_req queue entries of devices that were freed. pa_req that are already in progress are treated by the bap_data_free function. The lookup in bap_bcast_remove was necessary. The entry corresponding to the calling service must be removed from the pa_req queue. There is no other way to get a refference to this entry other than to search in the queue. This patch fixes a crash that occurs when a device is freed before the pa_idle_timer handles it's entry in the pa_req queue. The following log was obtained while running an Unicast setup: ==105052==ERROR: AddressSanitizer: heap-use-after-free on address 0x60400001c418 at pc 0x55775caf1846 bp 0x7ffc83d9fb90 sp 0x7ffc83d9fb80 READ of size 8 at 0x60400001c418 thread T0 0 0x55775caf1845 in btd_service_get_device src/service.c:325 1 0x55775ca03da2 in short_lived_pa_sync profiles/audio/bap.c:2693 2 0x55775ca03da2 in pa_idle_timer profiles/audio/bap.c:1996

Diffstat

M profiles/audio/bap.c | 18 ++++++++++++++++++

1 files changed, 18 insertions(+), 0 deletions(-)

View Full Diff | Patch