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