================================================================== BUG: KASAN: use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] BUG: KASAN: use-after-free in do_raw_spin_lock+0x279/0x2d0 kernel/locking/spinlock_debug.c:112 Read of size 4 at addr ffff888096482f0c by task syz-executor.4/16013 CPU: 1 PID: 16013 Comm: syz-executor.4 Not tainted 5.3.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x165/0x21a lib/dump_stack.c:113 print_address_description.cold.4+0x9/0x327 mm/kasan/report.c:351 __kasan_report.cold.5+0x1b/0x40 mm/kasan/report.c:482 kasan_report+0x12/0x17 mm/kasan/common.c:618 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] do_raw_spin_lock+0x279/0x2d0 kernel/locking/spinlock_debug.c:112 __raw_spin_lock include/linux/spinlock_api_smp.h:143 [inline] _raw_spin_lock+0x35/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] sco_chan_del+0x52/0x3e0 net/bluetooth/sco.c:142 __sco_sock_close+0x145/0x520 net/bluetooth/sco.c:433 sco_sock_close+0x26/0x40 net/bluetooth/sco.c:447 sco_sock_release+0x49/0x240 net/bluetooth/sco.c:1008 __sock_release+0xc2/0x270 net/socket.c:590 sock_close+0x13/0x20 net/socket.c:1268 __fput+0x25a/0x780 fs/file_table.c:280 ____fput+0x9/0x10 fs/file_table.c:313 task_work_run+0x108/0x180 kernel/task_work.c:113 get_signal+0x150d/0x1d00 kernel/signal.c:2528 do_signal+0x87/0x1620 arch/x86/kernel/signal.c:815 exit_to_usermode_loop+0x114/0x2e0 arch/x86/entry/common.c:159 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x462/0x540 arch/x86/entry/common.c:299 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45ccd9 Code: 2d b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f9b3abe8c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: fffffffffffffffc RBX: 0000000000002140 RCX: 000000000045ccd9 RDX: 0000000000000008 RSI: 0000000020000140 RDI: 0000000000000004 RBP: 000000000078bf40 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bf0c R13: 00007ffea5e8885f R14: 00007f9b3abe99c0 R15: 000000000078bf0c Allocated by task 16013: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc.part.0+0x44/0xc0 mm/kasan/common.c:493 __kasan_kmalloc.constprop.1+0xb1/0xc0 mm/kasan/common.c:474 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:507 kmem_cache_alloc_trace+0x162/0x410 mm/slab.c:3550 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:748 [inline] sco_conn_add+0xaa/0x210 net/bluetooth/sco.c:112 sco_connect net/bluetooth/sco.c:247 [inline] sco_sock_connect+0x2ce/0x820 net/bluetooth/sco.c:576 __sys_connect+0x20d/0x2d0 net/socket.c:1828 __do_sys_connect net/socket.c:1839 [inline] __se_sys_connect net/socket.c:1836 [inline] __x64_sys_connect+0x6e/0xb0 net/socket.c:1836 do_syscall_64+0xd0/0x540 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8325: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] __kasan_slab_free+0x11a/0x1e0 mm/kasan/common.c:455 kasan_slab_free+0xe/0x10 mm/kasan/common.c:463 __cache_free mm/slab.c:3425 [inline] kfree+0x104/0x2d0 mm/slab.c:3756 sco_conn_del.isra.0+0xf6/0x130 net/bluetooth/sco.c:184 sco_connect_cfm+0x1b3/0x700 net/bluetooth/sco.c:1123 hci_connect_cfm include/net/bluetooth/hci_core.h:1267 [inline] hci_sco_setup+0x2f8/0x400 net/bluetooth/hci_conn.c:391 hci_conn_complete_evt.isra.52+0xbab/0x1560 net/bluetooth/hci_event.c:2545 hci_event_packet+0x3c7b/0x7a22 net/bluetooth/hci_event.c:5870 hci_rx_work+0x4c6/0x900 net/bluetooth/hci_core.c:4462 process_one_work+0x7d2/0x1560 kernel/workqueue.c:2269 worker_thread+0x85/0xb60 kernel/workqueue.c:2415 kthread+0x331/0x3f0 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff888096482f00 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 12 bytes inside of 96-byte region [ffff888096482f00, ffff888096482f60) The buggy address belongs to the page: page:ffffea0002592080 refcount:1 mapcount:0 mapping:ffff8880aa400540 index:0xffff888096482e00 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00025e8308 ffffea0002632888 ffff8880aa400540 raw: ffff888096482e00 ffff888096482000 000000010000001f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888096482e00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888096482e80: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc >ffff888096482f00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff888096482f80: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ffff888096483000: 00 00 00 00 04 fc fc fc fc fc fc fc fc fc fc fc ==================================================================