]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: Fix potential use-after-free when clear keys
authorMin Li <lm0963hack@gmail.com>
Mon, 7 Aug 2023 11:07:41 +0000 (19:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:22:33 +0000 (12:22 +0200)
commit942d8cefb022f384d5424f8b90c7878f3f93726f
tree5751fce167c5a4535ccd6d89520ac12f6dd7fa38
parent7b0243d26a71f135297feaf75d55c19a944c63a8
Bluetooth: Fix potential use-after-free when clear keys

[ Upstream commit 3673952cf0c6cf81b06c66a0b788abeeb02ff3ae ]

Similar to commit c5d2b6fa26b5 ("Bluetooth: Fix use-after-free in
hci_remove_ltk/hci_remove_irk"). We can not access k after kfree_rcu()
call.

Fixes: d7d41682efc2 ("Bluetooth: Fix Suspicious RCU usage warnings")
Signed-off-by: Min Li <lm0963hack@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_core.c