Files
linux-stable-mirror/net/bluetooth
Shuvam PandeyandGreg Kroah-Hartman 01a6431766 Bluetooth: hci_event: fix potential UAF in SSP passkey handlers
commit 85fa351204 upstream.

hci_conn lookup and field access must be covered by hdev lock in
hci_user_passkey_notify_evt() and hci_keypress_notify_evt(), otherwise
the connection can be freed concurrently.

Extend the hci_dev_lock critical section to cover all conn usage in both
handlers.

Keep the existing keypress notification behavior unchanged by routing
the early exits through a common unlock path.

Fixes: 92a25256f1 ("Bluetooth: mgmt: Implement support for passkey notification")
Cc: stable@vger.kernel.org
Signed-off-by: Shuvam Pandey <shuvampandey1@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-07 06:09:40 +02:00
..
2026-03-25 11:08:52 +01:00
2025-11-24 10:35:56 +01:00
2025-11-24 10:35:56 +01:00