Skip to content

Clear workqueue to avoid use-after-free

Zhengping Jiang linux-bluetooth lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest1 patch 11 repliesIn review
  2. v11 patch 1 replySuperseded

Changes in v2 from the cover letter

- Add function to clear the queue without stop the timer

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1Bluetooth: hci_sync: clear workqueue before clear mgmt cmdnet/bluetooth/hci_sync.c+20 -111 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [kernel PATCH v2 0/1] Clear workqueue to avoid use-after-free

After the hci_sync rework, cmd_sync_work was cleared when calling hci_unregister_dev, but not when powering off the adapter. Use-after-free errors happen when a work is still scheduled when cmd is freed by __mgmt_power_off.

Changes in v2:
- Add function to clear the queue without stop the timer

Changes in v1:
- Clear cmd_sync_work queue before clearing the mgmt cmd list

Zhengping Jiang (1):
Bluetooth: hci_sync: clear workqueue before clear mgmt cmd

 net/bluetooth/hci_sync.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)
Signature · 1 line
2.39.2.722.g9855ee24e9-goog