Luiz Augusto von Dentz
7d6f9cb24d
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 13:22:51 +02:00
..
2021-09-15 09:47:31 +02:00
2022-08-25 11:18:17 +02:00
2021-07-31 08:19:38 +02:00
2021-12-01 09:23:34 +01:00
2021-04-07 14:47:41 +02:00
2020-10-01 13:17:58 +02:00
2022-04-20 09:19:40 +02:00
2022-05-18 09:47:24 +02:00
2022-10-26 13:22:51 +02:00
2022-09-05 10:27:46 +02:00
2021-07-14 16:53:33 +02:00
2022-09-28 11:04:07 +02:00
2021-09-22 12:26:40 +02:00
2022-10-26 13:22:50 +02:00
2020-11-05 11:43:34 +01:00
2022-10-26 13:22:51 +02:00
2022-03-08 19:07:51 +01:00
2022-08-25 11:17:49 +02:00
2021-07-28 13:30:56 +02:00
2020-04-23 10:36:45 +02:00
2022-03-23 09:12:07 +01:00
2020-01-09 10:20:06 +01:00
2021-05-14 09:44:10 +02:00
2022-10-26 13:22:26 +02:00
2022-10-26 13:22:48 +02:00
2022-10-26 13:22:25 +02:00
2021-03-07 12:20:42 +01:00
2022-09-15 12:04:50 +02:00
2022-09-05 10:27:40 +02:00
2022-06-22 14:11:21 +02:00
2022-04-27 13:50:47 +02:00
2021-02-10 09:25:28 +01:00
2022-03-28 08:46:48 +02:00
2022-10-26 13:22:22 +02:00
2022-09-15 12:04:53 +02:00
2021-12-08 09:01:12 +01:00
2022-01-05 12:37:45 +01:00
2022-09-28 11:04:05 +02:00
2022-04-15 14:18:35 +02:00
2022-05-18 09:47:25 +02:00
2021-07-28 13:30:56 +02:00
2022-06-14 18:11:33 +02:00
2022-10-26 13:22:48 +02:00
2022-09-05 10:27:48 +02:00
2022-01-11 15:23:33 +01:00
2019-12-04 22:30:54 +01:00
2021-09-03 10:08:12 +02:00
2022-10-26 13:22:26 +02:00
2020-11-24 13:29:05 +01:00
2022-09-05 10:27:40 +02:00
2022-09-28 11:03:58 +02:00
2022-09-28 11:04:07 +02:00
2022-10-26 13:22:26 +02:00
2022-09-15 12:04:50 +02:00
2021-11-17 09:48:48 +01:00
2022-09-05 10:27:40 +02:00
2021-10-27 09:54:24 +02:00
2022-09-15 12:04:55 +02:00
2022-07-29 17:14:12 +02:00
2022-06-14 18:11:57 +02:00
2022-10-26 13:22:25 +02:00
2022-10-15 07:54:41 +02:00
2022-04-15 14:18:21 +02:00
2021-12-22 09:29:40 +01:00
2022-10-26 13:22:49 +02:00
2021-06-18 09:59:00 +02:00
2020-04-01 11:02:18 +02:00
2022-09-05 10:27:42 +02:00