Commit 2244a2d
committed
Bluetooth: hci_sync: fix set_local_name race condition
jira KERNEL-228
cve CVE-2025-39981
Rebuild_History Non-Buildable kernel-5.14.0-611.11.1.el9_7
commit-author Pavel Shpakovskiy <pashpakovskii@salutedevices.com>
commit 6bbd0d3
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: 6f6ff38 ("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>
(cherry picked from commit 6bbd0d3)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent e212a12 commit 2244a2d
File tree
3 files changed
+8
-5
lines changed- include/net/bluetooth
- net/bluetooth
3 files changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3412 | 3412 | | |
3413 | 3413 | | |
3414 | 3414 | | |
3415 | | - | |
| 3415 | + | |
3416 | 3416 | | |
3417 | 3417 | | |
3418 | 3418 | | |
3419 | 3419 | | |
3420 | 3420 | | |
3421 | | - | |
| 3421 | + | |
3422 | 3422 | | |
3423 | 3423 | | |
3424 | 3424 | | |
| |||
3471 | 3471 | | |
3472 | 3472 | | |
3473 | 3473 | | |
3474 | | - | |
| 3474 | + | |
3475 | 3475 | | |
3476 | 3476 | | |
3477 | 3477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3890 | 3890 | | |
3891 | 3891 | | |
3892 | 3892 | | |
| 3893 | + | |
| 3894 | + | |
| 3895 | + | |
3893 | 3896 | | |
3894 | | - | |
| 3897 | + | |
3895 | 3898 | | |
3896 | 3899 | | |
3897 | 3900 | | |
| |||
0 commit comments