kernel_optimize_test/net/bluetooth
Niels Dossche 8ace1e6355 Bluetooth: use hdev lock for accept_list and reject_list in conn req
[ Upstream commit fb048cae51bacdfbbda2954af3c213fdb1d484f4 ]

All accesses (both reads and modifications) to
hdev->{accept,reject}_list are protected by hdev lock,
except the ones in hci_conn_request_evt. This can cause a race
condition in the form of a list corruption.
The solution is to protect these lists in hci_conn_request_evt as well.

I was unable to find the exact commit that introduced the issue for the
reject list, I was only able to find it for the accept list.

Fixes: a55bd29d52 ("Bluetooth: Add white list lookup for incoming connection requests")
Signed-off-by: Niels Dossche <dossche.niels@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:21:09 +02:00
..
bnep
cmtp Bluetooth: cmtp: fix possible panic when cmtp_init_sockets() fails 2022-01-27 10:53:45 +01:00
hidp Bluetooth: hidp: use correct wait queue when removing ctrl_wait 2021-08-26 08:35:40 -04:00
rfcomm Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2020-07-31 15:11:52 -07:00
6lowpan.c
a2mp.c Bluetooth: drop HCI device reference before return 2021-03-04 11:37:25 +01:00
a2mp.h
af_bluetooth.c
amp.c Bluetooth: Fix null pointer dereference in amp_read_loc_assoc_final_data 2021-03-07 12:34:10 +01:00
amp.h
ecdh_helper.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
ecdh_helper.h Fix misc new gcc warnings 2021-05-11 14:47:36 +02:00
hci_conn.c Bluetooth: use inclusive language in HCI role comments 2022-06-09 10:21:09 +02:00
hci_core.c Bluetooth: use inclusive language when filtering devices 2022-06-09 10:21:09 +02:00
hci_debugfs.c Bluetooth: use inclusive language when filtering devices 2022-06-09 10:21:09 +02:00
hci_debugfs.h
hci_event.c Bluetooth: use hdev lock for accept_list and reject_list in conn req 2022-06-09 10:21:09 +02:00
hci_request.c Bluetooth: use inclusive language when filtering devices 2022-06-09 10:21:09 +02:00
hci_request.h
hci_sock.c Bluetooth: use inclusive language when filtering devices 2022-06-09 10:21:09 +02:00
hci_sysfs.c Bluetooth: defer cleanup of resources in hci_unregister_dev() 2021-08-12 13:22:08 +02:00
Kconfig Bluetooth: Disable High Speed by default 2020-09-25 20:21:55 +02:00
l2cap_core.c Bluetooth: use inclusive language when filtering devices 2022-06-09 10:21:09 +02:00
l2cap_sock.c Bluetooth: L2CAP: uninitialized variables in l2cap_sock_setsockopt() 2022-01-27 10:54:02 +01:00
leds.c
leds.h
lib.c
Makefile
mgmt_config.c Bluetooth: Interleave with allowlist scan 2022-06-09 10:21:08 +02:00
mgmt_config.h
mgmt_util.c
mgmt_util.h
mgmt.c Bluetooth: use inclusive language when filtering devices 2022-06-09 10:21:09 +02:00
msft.c Bluetooth: Replace zero-length array with flexible-array member 2020-10-29 17:22:59 -05:00
msft.h
sco.c Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout 2022-06-09 10:21:08 +02:00
selftest.c Bluetooth: Remove CRYPTO_ALG_INTERNAL flag 2020-07-31 16:42:04 +03:00
selftest.h
smp.c Bluetooth: use inclusive language in HCI role comments 2022-06-09 10:21:09 +02:00
smp.h