Luiz Augusto von Dentz
ba1db5d97e
Bluetooth: L2CAP: Fix user-after-free
[ Upstream commit 35fcbc4243 ]
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>
2023-06-29 09:27:02 +09:00
..
2023-05-15 16:44:57 +09:00
2023-06-29 09:26:48 +09:00
2023-05-16 11:34:46 +09:00
2023-05-15 16:32:51 +09:00
2023-05-16 10:49:55 +09:00
2023-05-16 09:16:14 +09:00
2023-05-16 12:45:55 +09:00
2023-05-16 12:46:11 +09:00
2023-06-29 09:27:02 +09:00
2023-06-29 09:26:53 +09:00
2023-05-16 11:46:39 +09:00
2023-06-29 09:27:01 +09:00
2023-05-16 09:45:38 +09:00
2023-06-29 09:26:50 +09:00
2023-05-16 12:44:53 +09:00
2023-05-16 11:46:42 +09:00
2023-05-16 11:34:05 +09:00
2023-05-12 16:29:40 +09:00
2023-05-15 17:13:02 +09:00
2023-05-15 16:31:00 +09:00
2023-05-16 10:54:56 +09:00
2023-06-29 09:26:56 +09:00
2023-06-29 09:27:01 +09:00
2023-06-29 09:26:45 +09:00
2023-05-12 17:27:16 +09:00
2023-05-16 09:50:42 +09:00
2023-05-15 12:22:31 +09:00
2023-06-29 09:26:50 +09:00
2023-06-29 09:26:38 +09:00
2023-05-16 10:34:08 +09:00
2023-05-16 12:47:02 +09:00
2023-06-29 09:26:58 +09:00
2023-06-29 09:26:52 +09:00
2023-05-16 10:46:16 +09:00
2023-05-16 10:24:55 +09:00
2023-06-29 09:26:54 +09:00
2023-05-16 12:33:58 +09:00
2023-06-29 09:26:14 +09:00
2023-05-16 11:34:06 +09:00
2023-06-29 09:26:19 +09:00
2023-06-29 09:27:01 +09:00
2023-06-29 09:26:10 +09:00
2023-05-16 12:30:20 +09:00
2023-05-16 10:49:33 +09:00
2023-06-29 09:26:59 +09:00
2023-05-15 16:32:30 +09:00
2023-06-29 09:26:50 +09:00
2023-06-29 09:26:20 +09:00
2023-06-29 09:26:53 +09:00
2023-06-29 09:26:20 +09:00
2018-04-29 11:32:02 +02:00
2023-06-29 09:26:53 +09:00
2023-06-29 09:26:53 +09:00
2023-05-16 12:33:30 +09:00
2023-06-29 09:26:48 +09:00
2023-06-29 09:26:34 +09:00
2023-06-29 09:26:51 +09:00
2023-06-29 09:26:04 +09:00
2023-06-29 09:27:01 +09:00
2023-05-16 11:14:47 +09:00
2023-05-15 17:31:52 +09:00
2023-05-16 11:34:41 +09:00
2023-06-29 09:26:50 +09:00