Luiz Augusto von Dentz
d1e894f950
Bluetooth: L2CAP: Fix user-after-free
...
[ Upstream commit 35fcbc4243aad7e7d020b7c1dfb14bb888b20a4f ]
This uses l2cap_chan_hold_unless_zero() after calling
__l2cap_get_chan_blah() to prevent the following trace:
Bluetooth: l2cap_core.c:static void l2cap_chan_destroy(struct kref
*kref)
Bluetooth: chan 0000000023c4974d
Bluetooth: parent 00000000ae861c08
==================================================================
BUG: KASAN: use-after-free in __mutex_waiter_is_first
kernel/locking/mutex.c:191 [inline]
BUG: KASAN: use-after-free in __mutex_lock_common
kernel/locking/mutex.c:671 [inline]
BUG: KASAN: use-after-free in __mutex_lock+0x278/0x400
kernel/locking/mutex.c:729
Read of size 8 at addr ffff888006a49b08 by task kworker/u3:2/389
Link: https://lore.kernel.org/lkml/20220622082716.478486-1-lee.jones@linaro.org
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sungwoo Kim <iam@sung-woo.kim>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 12:35:37 +02:00
..
2021-07-22 16:19:03 +02:00
2022-08-17 14:24:23 +02:00
2021-08-13 16:30:35 -07:00
2022-08-31 17:16:37 +02:00
2021-07-23 14:20:25 +01:00
2021-06-10 14:08:09 -07:00
2022-06-22 14:22:01 +02:00
2022-07-29 17:25:07 +02:00
2022-10-26 12:35:37 +02:00
2022-09-05 10:30:07 +02:00
2021-06-25 13:13:50 +02:00
2022-09-28 11:11:52 +02:00
2021-09-14 12:51:15 +01:00
2022-10-26 12:35:36 +02:00
2022-05-25 09:57:28 +02:00
2022-10-26 12:35:37 +02:00
2022-03-08 19:12:52 +01:00
2022-08-17 14:23:37 +02:00
2022-08-03 12:03:51 +02:00
2022-09-20 12:39:45 +02:00
2021-08-03 13:05:26 +01:00
2022-06-29 09:03:23 +02:00
2022-08-31 17:16:37 +02:00
2022-10-26 12:34:49 +02:00
2022-10-26 12:35:33 +02:00
2022-10-26 12:34:47 +02:00
2021-08-09 10:13:32 +01:00
2022-09-08 12:28:03 +02:00
2022-08-31 17:16:36 +02:00
2022-06-22 14:21:58 +02:00
2022-04-27 14:38:53 +02:00
2021-06-08 16:31:25 -07:00
2022-03-28 09:58:46 +02:00
2022-10-26 12:34:39 +02:00
2022-09-08 12:28:07 +02:00
2022-04-13 20:59:16 +02:00
2022-09-08 12:28:07 +02:00
2022-08-31 17:16:50 +02:00
2022-01-05 12:42:37 +01:00
2022-10-26 12:34:45 +02:00
2022-04-13 20:59:10 +02:00
2022-08-25 11:40:25 +02:00
2022-01-27 11:04:00 +01:00
2022-06-09 10:22:46 +02:00
2022-10-26 12:35:33 +02:00
2022-09-05 10:30:12 +02:00
2022-01-11 15:35:16 +01:00
2022-08-25 11:40:29 +02:00
2022-10-26 12:34:49 +02:00
2022-04-08 14:23:00 +02:00
2022-08-31 17:16:38 +02:00
2022-09-23 14:15:50 +02:00
2022-10-05 10:39:42 +02:00
2022-10-26 12:34:48 +02:00
2022-09-28 11:11:53 +02:00
2021-11-18 19:17:11 +01:00
2022-08-31 17:16:37 +02:00
2021-08-04 12:35:07 +01:00
2022-09-15 11:30:05 +02:00
2022-08-03 12:03:47 +02:00
2022-06-14 18:36:17 +02:00
2022-10-26 12:34:47 +02:00
2022-10-15 07:59:03 +02:00
2022-04-08 14:23:53 +02:00
2022-10-26 12:34:40 +02:00
2022-10-26 12:35:34 +02:00
2021-06-11 12:55:28 -07:00
2021-07-29 15:06:49 +01:00
2021-07-29 15:06:49 +01:00
2022-08-31 17:16:45 +02:00