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