You need to sign in or sign up before continuing.
提交 1e9ac114 编写于 作者: Z Zheng Wang 提交者: Luiz Augusto von Dentz

Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work

In btsdio_probe, &data->work was bound with btsdio_work.In
btsdio_send_frame, it was started by schedule_work.

If we call btsdio_remove with an unfinished job, there may
be a race condition and cause UAF bug on hdev.

Fixes: ddbaf13e ("[Bluetooth] Add generic driver for Bluetooth SDIO devices")
Signed-off-by: NZheng Wang <zyytlz.wz@163.com>
Signed-off-by: NLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
上级 9aa9d947
...@@ -354,6 +354,7 @@ static void btsdio_remove(struct sdio_func *func) ...@@ -354,6 +354,7 @@ static void btsdio_remove(struct sdio_func *func)
BT_DBG("func %p", func); BT_DBG("func %p", func);
cancel_work_sync(&data->work);
if (!data) if (!data)
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册