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
..
2019-06-19 17:09:07 +02:00
2022-01-27 09:19:29 +01:00
2021-08-26 08:36:15 -04:00
2022-07-29 17:14:19 +02:00
2020-08-19 08:15:59 +02:00
2021-03-04 10:26:14 +01:00
2019-06-05 17:36:37 +02:00
2019-10-28 13:33:41 -07:00
2021-03-07 12:20:45 +01:00
2019-06-05 17:36:37 +02:00
2021-05-11 14:04:16 +02:00
2020-10-17 10:11:22 +02:00
2022-05-15 19:54:47 +02:00
2019-08-17 13:54:40 +03:00
2022-04-15 14:18:34 +02:00
2021-05-14 09:44:10 +02:00
2019-07-06 15:38:18 +02:00
2021-08-12 13:20:58 +02:00
2022-10-26 13:22:49 +02:00
2019-07-26 14:58:12 +10:00
2022-10-26 13:22:51 +02:00
2021-11-17 09:48:27 +01:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2017-11-02 11:10:55 +01:00
2021-07-19 08:53:13 +02:00
2022-07-29 17:14:19 +02:00
2017-10-06 21:49:13 +03:00
2021-05-26 12:05:21 +02:00
2018-09-26 12:39:32 +03:00