]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: prefetch channel before killing sock
authorHillf Danton <hdanton@sina.com>
Wed, 5 Feb 2020 02:31:59 +0000 (10:31 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 5 Feb 2020 08:05:04 +0000 (09:05 +0100)
commit63b20c0d0cd3f0676820082275ebeb574702ff20
tree7c1dfbe14f16ab556ffec7dccfd946816ca51415
parent2f4a2beaa2b73077c349b9901d319c96de8b98cc
Bluetooth: prefetch channel before killing sock

Prefetch channel before killing sock in order to fix UAF like

 BUG: KASAN: use-after-free in l2cap_sock_release+0x24c/0x290 net/bluetooth/l2cap_sock.c:1212
 Read of size 8 at addr ffff8880944904a0 by task syz-fuzzer/9751

Reported-by: syzbot+c3c5bdea7863886115dc@syzkaller.appspotmail.com
Fixes: 02271a6e9061 ("Bluetooth: Fix refcount use-after-free issue")
Cc: Manish Mandlik <mmandlik@google.com>
Signed-off-by: Hillf Danton <hdanton@sina.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap_sock.c