Commit: 19ce052d35d367005bfcf63461e43758301556f1
Parent: 80f2fa14b6d431fba9402e5efae0ac7bd98892bf
Author: Pauli Virtanen <pav@iki.fi>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2023-07-05 20:48:31
Tree: d737f5a6ef6e2fb75450f1ca706d01235d106d51

mgmt-tester: Add a regression test hitting hci_sync bug Add a test "Add + Remove Device Nowait - Success" that hits a race condition in kernel hci_sync.c. On current kernels this causes BUG: KASAN: slab-use-after-free in hci_update_passive_scan_sync+0x857/0x1230 due to unsafe iteration of hdev->pend_le_conns (in Linux <= 6.4-rc4). This seems to hit the race condition also without the added emulator delay (since the emulator runs in the same thread), but it's better to add the delay since otherwise it'll depend on timings on kernel side.

Diffstat

M tools/mgmt-tester.c | 49 ++++++++++++++++++++++++++++++++++++++++

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

View Full Diff | Patch