Archie Pusaka
2033dde6aa
Bluetooth: check for zapped sk before connecting
...
[ Upstream commit 3af70b39fa2d415dc86c370e5b24ddb9fdacbd6f ]
There is a possibility of receiving a zapped sock on
l2cap_sock_connect(). This could lead to interesting crashes, one
such case is tearing down an already tore l2cap_sock as is happened
with this call trace:
__dump_stack lib/dump_stack.c:15 [inline]
dump_stack+0xc4/0x118 lib/dump_stack.c:56
register_lock_class kernel/locking/lockdep.c:792 [inline]
register_lock_class+0x239/0x6f6 kernel/locking/lockdep.c:742
__lock_acquire+0x209/0x1e27 kernel/locking/lockdep.c:3105
lock_acquire+0x29c/0x2fb kernel/locking/lockdep.c:3599
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:137 [inline]
_raw_spin_lock_bh+0x38/0x47 kernel/locking/spinlock.c:175
spin_lock_bh include/linux/spinlock.h:307 [inline]
lock_sock_nested+0x44/0xfa net/core/sock.c:2518
l2cap_sock_teardown_cb+0x88/0x2fb net/bluetooth/l2cap_sock.c:1345
l2cap_chan_del+0xa3/0x383 net/bluetooth/l2cap_core.c:598
l2cap_chan_close+0x537/0x5dd net/bluetooth/l2cap_core.c:756
l2cap_chan_timeout+0x104/0x17e net/bluetooth/l2cap_core.c:429
process_one_work+0x7e3/0xcb0 kernel/workqueue.c:2064
worker_thread+0x5a5/0x773 kernel/workqueue.c:2196
kthread+0x291/0x2a6 kernel/kthread.c:211
ret_from_fork+0x4e/0x80 arch/x86/entry/entry_64.S:604
Signed-off-by: Archie Pusaka <apusaka@chromium.org>
Reported-by: syzbot+abfc0f5e668d4099af73@syzkaller.appspotmail.com
Reviewed-by: Alain Michaud <alainm@chromium.org>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-19 10:12:53 +02:00
..
2020-07-19 18:16:41 -07:00
2020-07-19 18:16:41 -07:00
2020-07-19 18:16:41 -07:00
2020-07-31 15:11:52 -07: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
2021-05-14 09:50:29 +02:00
2021-03-07 12:34:10 +01:00
2020-04-07 18:32:21 +02:00
2021-05-19 10:12:52 +02:00
2021-05-14 09:49:55 +02:00
2020-07-30 09:34:43 +02:00
2020-07-31 15:11:52 -07:00
2017-11-04 09:26:51 +09:00
2020-09-25 20:21:55 +02:00
2021-05-19 10:12:53 +02:00
2021-05-19 10:12:53 +02: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
2020-07-07 17:37:03 +02:00
2020-06-18 13:11:03 +03:00
2017-06-16 11:48:40 -04:00
2015-03-17 18:03:08 +01:00
2020-09-25 20:21:55 +02:00
2020-10-29 17:22:59 -05:00
2020-06-18 13:11:21 +03:00
2020-12-30 11:53:40 +01:00
2020-07-31 16:42:04 +03:00
2020-08-07 11:33:22 -07:00
2018-09-26 12:39:32 +03:00