linux/net/bluetooth
Desmond Cheong Zhi Xi c20d8c1974 Bluetooth: fix init and cleanup of sco_conn.timeout_work
[ Upstream commit 49d8a56064 ]

Before freeing struct sco_conn, all delayed timeout work should be
cancelled. Otherwise, sco_sock_timeout could potentially use the
sco_conn after it has been freed.

Additionally, sco_conn.timeout_work should be initialized when the
connection is allocated, not when the channel is added. This is
because an sco_conn can create channels with multiple sockets over its
lifetime, which happens if sockets are released but the connection
isn't deleted.

Fixes: ba316be1b6 ("Bluetooth: schedule SCO timeouts with delayed_work")
Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-18 14:04:01 +01:00
..
bnep
cmtp Bluetooth: increase BTNAMSIZ to 21 chars to fix potential buffer overflow 2021-09-15 09:50:37 +02:00
hidp Bluetooth: hidp: use correct wait queue when removing ctrl_wait 2021-08-26 08:35:40 -04:00
rfcomm
6lowpan.c
a2mp.c
a2mp.h
af_bluetooth.c
amp.c
amp.h
ecdh_helper.c
ecdh_helper.h
hci_conn.c Bluetooth: avoid deadlock between hci_dev->lock and socket lock 2021-05-14 09:50:29 +02:00
hci_core.c Revert "Bluetooth: Move shutdown callback before flushing tx and rx queue" 2021-09-16 12:51:23 +02:00
hci_debugfs.c
hci_debugfs.h
hci_event.c Bluetooth: Fix handling of LE Enhanced Connection Complete 2021-09-18 13:40:29 +02:00
hci_request.c Bluetooth: Fix Set Extended (Scan Response) Data 2021-07-14 16:56:30 +02:00
hci_request.h
hci_sock.c Bluetooth: defer cleanup of resources in hci_unregister_dev() 2021-08-12 13:22:08 +02:00
hci_sysfs.c Bluetooth: defer cleanup of resources in hci_unregister_dev() 2021-08-12 13:22:08 +02:00
Kconfig
l2cap_core.c Bluetooth: L2CAP: Fix invalid access on ECRED Connection response 2021-07-19 09:44:54 +02:00
l2cap_sock.c Bluetooth: fix use-after-free error in lock_sock_nested() 2021-11-18 14:03:52 +01:00
leds.c
leds.h
lib.c
Makefile
mgmt_config.c
mgmt_config.h
mgmt_util.c
mgmt_util.h
mgmt.c Bluetooth: mgmt: Fix wrong opcode in the response for add_adv cmd 2021-09-15 09:50:35 +02:00
msft.c
msft.h
sco.c Bluetooth: fix init and cleanup of sco_conn.timeout_work 2021-11-18 14:04:01 +01:00
selftest.c
selftest.h
smp.c Bluetooth: SMP: Fail if remote and local public keys are identical 2021-05-26 12:06:57 +02:00
smp.h