Pauli Virtanen
af24e338bf
Bluetooth: ISO: fix race of kfree vs kref_get_unless_zero
...
hci_conn::iso_data is accessed and modified without lock or RCU.
This leads to a race
[Task hdev->workqueue] [Task 2]
iso_recv iso_conn_put(conn)
conn = LOAD hcon->iso_data iso_conn_free(conn)
iso_conn_hold_unless_zero(conn) hcon->iso_data = NULL
kfree(conn)
kref_get_unless_zero(&conn->ref) /* UAF */
and also to races in iso_conn_add() vs. iso_conn_free().
Fix by adding spinlock hci_conn::proto_lock and using it to guard
hci_conn::iso_data.
Fixes: dc26097bdb ("Bluetooth: ISO: Use kref to track lifetime of iso_conn")
Signed-off-by: Pauli Virtanen <pav@iki.fi >
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com >
2026-07-28 16:13:12 -04:00
..
2026-06-11 15:27:07 -07:00
2026-06-21 05:22:57 +00:00
2026-06-16 14:37:06 -07:00
2026-06-25 10:18:40 -07:00
2026-06-16 14:59:58 -07:00
2026-07-06 07:18:59 +02:00
2026-07-28 16:13:12 -04:00
2026-06-21 17:55:06 -07:00
2026-07-27 15:56:55 -07:00
2026-07-16 10:11:12 +02:00
2026-05-12 21:00:59 +02:00
2026-07-28 13:22:11 +02:00
2026-02-21 17:09:51 -08:00
2026-06-18 18:02:29 -07:00
2026-06-04 18:39:29 -07:00
2026-06-27 15:44:12 -07:00
2026-03-16 19:29:45 -07:00
2026-07-09 11:38:30 +02:00
2026-06-12 15:45:44 -07:00
2026-07-22 10:24:44 -07:00
2026-06-19 23:02:42 +02:00
2026-06-13 17:34:39 -07:00
2026-07-28 13:32:34 +02:00
2026-07-27 15:20:01 -07:00
2026-07-21 13:36:35 -07:00
2026-06-16 14:59:58 -07:00
2026-06-23 16:22:24 -07:00
2026-06-04 15:29:04 -07:00
2026-02-21 01:02:28 -08:00
2026-07-17 13:17:46 +02:00
2026-07-21 13:35:22 +02:00
2026-07-23 10:37:46 -07:00
2026-07-23 09:17:36 -07:00
2026-07-28 11:06:06 +02:00
2026-07-23 10:50:38 -07:00
2026-03-06 17:34:48 -08:00
2026-07-23 18:17:55 +02:00
2026-06-11 14:33:35 -07:00
2026-05-28 14:02:21 -07:00
2026-06-11 20:21:32 +02:00
2026-07-21 10:25:25 +02:00
2026-07-20 18:15:20 -07:00
2026-07-23 10:28:50 -07:00
2026-06-17 16:35:50 -07:00
2026-06-12 18:31:32 -07:00
2026-07-23 07:44:00 -07:00
2026-07-23 14:11:37 -07:00
2026-07-03 07:38:17 +02:00
2026-07-21 11:52:29 +02:00
2026-07-28 11:18:58 +02:00
2026-07-27 15:45:24 -07:00
2026-06-11 12:55:23 +02:00
2026-07-28 11:22:43 +02:00
2026-04-14 12:37:00 +02:00
2026-07-08 14:07:19 -04:00
2026-03-19 13:14:00 +01:00
2026-07-27 15:18:59 -07:00
2026-07-21 14:50:50 -07:00
2026-07-24 15:10:05 -07:00
2026-07-21 12:11:06 +02:00
2026-07-21 14:12:24 +02:00
2026-07-23 11:58:20 +02:00
2026-07-24 15:12:14 -07:00
2026-07-06 08:30:02 +02:00
2026-05-29 14:05:30 +08:00
2026-06-16 14:37:06 -07:00
2026-06-16 14:37:06 -07:00
2026-06-17 08:17:00 +01:00