Bluetooth: Fix use-after-free in hci_remove_ltk/hci_remove_irk
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 30 May 2023 20:48:44 +0000 (13:48 -0700)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 6 Jun 2023 00:13:14 +0000 (17:13 -0700)
commitc5d2b6fa26b5b8386a9cc902cdece3a46bef2bd2
tree7cd4150224ede2fca9f8b2e042a8e4004a43fe38
parente6a7a46b8636efe95c75bed63a57fc05c13feba4
Bluetooth: Fix use-after-free in hci_remove_ltk/hci_remove_irk

Similar to commit 0f7d9b31ce7a ("netfilter: nf_tables: fix use-after-free
in nft_set_catchall_destroy()"). We can not access k after kfree_rcu()
call.

Cc: stable@vger.kernel.org
Signed-off-by: Min Li <lm0963hack@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_core.c