[PW_SID:1104912] Bluetooth: Fix Use-After-Free in hci_unregister_dev#278
[PW_SID:1104912] Bluetooth: Fix Use-After-Free in hci_unregister_dev#278BluezTestBot wants to merge 1 commit into
Conversation
The hci_unregister_dev() function fails to disable the cmd_timer and ncmd_timer before freeing the hci_dev structure. If an asynchronous event or timeout occurs during device teardown, the timer callbacks may execute after the device has been freed, leading to a KASAN slab-use-after-free panic. This patch adds the necessary disable_delayed_work_sync() calls to securely flush the timers before the teardown sequence proceeds. Signed-off-by: Jordan Walters <gloambit@gloam.sh>
|
CheckPatch |
|
VerifyFixes |
|
VerifySignedoff |
|
GitLint |
|
SubjectPrefix |
|
BuildKernel |
|
CheckAllWarning |
|
CheckSparse |
|
BuildKernel32 |
|
TestRunnerSetup |
|
TestRunner_l2cap-tester |
|
TestRunner_iso-tester |
|
TestRunner_bnep-tester |
|
TestRunner_mgmt-tester |
|
TestRunner_rfcomm-tester |
|
TestRunner_sco-tester |
|
TestRunner_ioctl-tester |
|
TestRunner_mesh-tester |
|
TestRunner_smp-tester |
|
TestRunner_userchan-tester |
|
TestRunner_6lowpan-tester |
|
IncrementalBuild |
The hci_unregister_dev() function fails to disable the cmd_timer and ncmd_timer
before freeing the hci_dev structure. If an asynchronous event or timeout occurs
during device teardown, the timer callbacks may execute after the device has
been freed, leading to a KASAN slab-use-after-free panic.
This patch adds the necessary disable_delayed_work_sync() calls to securely flush
the timers before the teardown sequence proceeds.
Signed-off-by: Jordan Walters gloambit@gloam.sh
net/bluetooth/hci_core.c | 2 ++
1 file changed, 2 insertions(+)