linux/net/bluetooth
Pavel Shpakovskiy 6bbd0d3f0c Bluetooth: hci_sync: fix set_local_name race condition
Function set_name_sync() uses hdev->dev_name field to send
HCI_OP_WRITE_LOCAL_NAME command, but copying from data to hdev->dev_name
is called after mgmt cmd was queued, so it is possible that function
set_name_sync() will read old name value.

This change adds name as a parameter for function hci_update_name_sync()
to avoid race condition.

Fixes: 6f6ff38a1e ("Bluetooth: hci_sync: Convert MGMT_OP_SET_LOCAL_NAME")
Signed-off-by: Pavel Shpakovskiy <pashpakovskii@salutedevices.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2025-08-22 13:57:31 -04:00
..
bnep Bluetooth: bnep: fix wild-memory-access in proto_unregister 2024-10-16 16:10:03 -04:00
cmtp Bluetooth: CMTP: Mark BT_CMTP as DEPRECATED 2024-09-10 13:07:08 -04:00
hidp treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
rfcomm Networking changes for 6.17. 2025-07-30 08:58:55 -07:00
6lowpan.c Bluetooth: L2CAP: add TX timestamping 2025-03-25 12:50:35 -04:00
Kconfig Bluetooth: Remove BT_HS 2024-03-06 17:22:39 -05:00
Makefile Bluetooth: Introduce HCI Driver protocol 2025-05-21 10:28:07 -04:00
af_bluetooth.c Bluetooth: ISO: add socket option to report packet seqnum via CMSG 2025-07-23 10:31:19 -04:00
aosp.c Bluetooth: aosp: Fix typo in comment 2025-07-23 10:30:18 -04:00
aosp.h
coredump.c Bluetooth: hci_devcd_dump: fix out-of-bounds via dev_coredumpv 2025-07-23 10:33:57 -04:00
ecdh_helper.c Bluetooth: Use crypto_wait_req 2023-02-13 18:34:48 +08:00
ecdh_helper.h
eir.c Bluetooth: eir: Fix possible crashes on eir_create_adv_data 2025-06-11 16:29:22 -04:00
eir.h Bluetooth: eir: Fix possible crashes on eir_create_adv_data 2025-06-11 16:29:22 -04:00
hci_codec.c Bluetooth: Fix support for Read Local Supported Codecs V2 2022-12-02 13:09:31 -08:00
hci_codec.h
hci_conn.c Bluetooth: hci_conn: Make unacked packet handling more robust 2025-08-22 13:40:18 -04:00
hci_core.c Bluetooth: Add PA_LINK to distinguish BIG sync and PA sync connections 2025-07-23 10:35:14 -04:00
hci_debugfs.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
hci_debugfs.h
hci_drv.c Bluetooth: Introduce HCI Driver protocol 2025-05-21 10:28:07 -04:00
hci_event.c Bluetooth: hci_event: Disconnect device when BIG sync is lost 2025-08-22 13:57:14 -04:00
hci_sock.c Bluetooth: hci_sock: Reset cookie to zero in hci_sock_free_cookie() 2025-07-23 10:25:34 -04:00
hci_sync.c Bluetooth: hci_sync: fix set_local_name race condition 2025-08-22 13:57:31 -04:00
hci_sysfs.c Bluetooth: Allow reset via sysfs 2025-01-15 10:37:07 -05:00
iso.c Bluetooth: hci_core: Fix using {cis,bis}_capable for current settings 2025-08-15 09:44:49 -04:00
l2cap_core.c Bluetooth: L2CAP: Fix attempting to adjust outgoing MTU 2025-07-17 10:26:53 -04:00
l2cap_sock.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-07-17 11:00:33 -07:00
leds.c Bluetooth: Use led_set_brightness() in LED trigger activate() callback 2024-09-10 13:06:11 -04:00
leds.h
lib.c Bluetooth: Fix typos in comments 2025-07-23 10:30:48 -04:00
mgmt.c Bluetooth: hci_sync: fix set_local_name race condition 2025-08-22 13:57:31 -04:00
mgmt_config.c
mgmt_config.h
mgmt_util.c Bluetooth: MGMT: Protect mgmt_pending list with its own lock 2025-06-05 14:54:57 -04:00
mgmt_util.h Bluetooth: MGMT: Protect mgmt_pending list with its own lock 2025-06-05 14:54:57 -04:00
msft.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
msft.h Bluetooth: msft: fix slab-use-after-free in msft_do_close() 2024-05-03 13:05:28 -04:00
sco.c net: make sk->sk_sndtimeo lockless 2025-06-23 17:05:11 -07:00
selftest.c
selftest.h
smp.c Bluetooth: Fix typos in comments 2025-07-23 10:30:48 -04:00
smp.h Bluetooth: SMP: If an unallowed command is received consider it a failure 2025-07-16 15:33:30 -04:00