================================================================== BUG: KASAN: use-after-free in hci_chan_del+0x1a7/0x1e0 syzkaller/managers/linux-4-14/kernel/net/bluetooth/hci_conn.c:1564 Read of size 8 at addr ffff8880b55cbb58 by task syz-executor.4/14286 CPU: 1 PID: 14286 Comm: syz-executor.4 Not tainted 4.14.218-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack syzkaller/managers/linux-4-14/kernel/lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 syzkaller/managers/linux-4-14/kernel/lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 syzkaller/managers/linux-4-14/kernel/mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 syzkaller/managers/linux-4-14/kernel/mm/kasan/report.c:351 kasan_report syzkaller/managers/linux-4-14/kernel/mm/kasan/report.c:409 [inline] __asan_report_load8_noabort+0x68/0x70 syzkaller/managers/linux-4-14/kernel/mm/kasan/report.c:430 hci_chan_del+0x1a7/0x1e0 syzkaller/managers/linux-4-14/kernel/net/bluetooth/hci_conn.c:1564 l2cap_conn_del+0x426/0x690 syzkaller/managers/linux-4-14/kernel/net/bluetooth/l2cap_core.c:1739 l2cap_disconn_cfm syzkaller/managers/linux-4-14/kernel/net/bluetooth/l2cap_core.c:7441 [inline] l2cap_disconn_cfm+0x7c/0xb0 syzkaller/managers/linux-4-14/kernel/net/bluetooth/l2cap_core.c:7434 hci_disconn_cfm syzkaller/managers/linux-4-14/kernel/./include/net/bluetooth/hci_core.h:1226 [inline] hci_conn_hash_flush+0x127/0x260 syzkaller/managers/linux-4-14/kernel/net/bluetooth/hci_conn.c:1393 hci_dev_do_close+0x535/0xca0 syzkaller/managers/linux-4-14/kernel/net/bluetooth/hci_core.c:1620 hci_unregister_dev+0x17f/0x8c0 syzkaller/managers/linux-4-14/kernel/net/bluetooth/hci_core.c:3191 vhci_release+0x70/0xe0 syzkaller/managers/linux-4-14/kernel/drivers/bluetooth/hci_vhci.c:354 __fput+0x25f/0x7a0 syzkaller/managers/linux-4-14/kernel/fs/file_table.c:210 task_work_run+0x11f/0x190 syzkaller/managers/linux-4-14/kernel/kernel/task_work.c:113 exit_task_work syzkaller/managers/linux-4-14/kernel/./include/linux/task_work.h:22 [inline] do_exit+0xa44/0x2850 syzkaller/managers/linux-4-14/kernel/kernel/exit.c:868 do_group_exit+0x100/0x2e0 syzkaller/managers/linux-4-14/kernel/kernel/exit.c:965 get_signal+0x38d/0x1ca0 syzkaller/managers/linux-4-14/kernel/kernel/signal.c:2423 do_signal+0x7c/0x1550 syzkaller/managers/linux-4-14/kernel/arch/x86/kernel/signal.c:814 exit_to_usermode_loop+0x160/0x200 syzkaller/managers/linux-4-14/kernel/arch/x86/entry/common.c:160 prepare_exit_to_usermode syzkaller/managers/linux-4-14/kernel/arch/x86/entry/common.c:199 [inline] syscall_return_slowpath syzkaller/managers/linux-4-14/kernel/arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 syzkaller/managers/linux-4-14/kernel/arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x465d99 RSP: 002b:00007fdb34fd6218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000056c0b8 RCX: 0000000000465d99 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000056c0b8 RBP: 000000000056c0b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c0bc R13: 00007ffd3e93030f R14: 00007fdb34fd6300 R15: 0000000000022000 Allocated by task 13199: save_stack syzkaller/managers/linux-4-14/kernel/mm/kasan/kasan.c:447 [inline] set_track syzkaller/managers/linux-4-14/kernel/mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 syzkaller/managers/linux-4-14/kernel/mm/kasan/kasan.c:551 __do_kmalloc syzkaller/managers/linux-4-14/kernel/mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 syzkaller/managers/linux-4-14/kernel/mm/slab.c:3729 kmalloc syzkaller/managers/linux-4-14/kernel/./include/linux/slab.h:493 [inline] kzalloc syzkaller/managers/linux-4-14/kernel/./include/linux/slab.h:661 [inline] __register_sysctl_table+0xfd/0xf90 syzkaller/managers/linux-4-14/kernel/fs/proc/proc_sysctl.c:1304 devinet_init_net+0x167/0x450 syzkaller/managers/linux-4-14/kernel/net/ipv4/devinet.c:2428 ops_init+0xaa/0x3e0 syzkaller/managers/linux-4-14/kernel/net/core/net_namespace.c:118 setup_net+0x22f/0x530 syzkaller/managers/linux-4-14/kernel/net/core/net_namespace.c:295 copy_net_ns+0x19b/0x440 syzkaller/managers/linux-4-14/kernel/net/core/net_namespace.c:419 create_new_namespaces+0x375/0x720 syzkaller/managers/linux-4-14/kernel/kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xa1/0x1d0 syzkaller/managers/linux-4-14/kernel/kernel/nsproxy.c:206 SYSC_unshare syzkaller/managers/linux-4-14/kernel/kernel/fork.c:2412 [inline] SyS_unshare+0x308/0x7f0 syzkaller/managers/linux-4-14/kernel/kernel/fork.c:2362 do_syscall_64+0x1d5/0x640 syzkaller/managers/linux-4-14/kernel/arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 17: save_stack syzkaller/managers/linux-4-14/kernel/mm/kasan/kasan.c:447 [inline] set_track syzkaller/managers/linux-4-14/kernel/mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 syzkaller/managers/linux-4-14/kernel/mm/kasan/kasan.c:524 __cache_free syzkaller/managers/linux-4-14/kernel/mm/slab.c:3496 [inline] kfree+0xc9/0x250 syzkaller/managers/linux-4-14/kernel/mm/slab.c:3815 __rcu_reclaim syzkaller/managers/linux-4-14/kernel/kernel/rcu/rcu.h:190 [inline] rcu_do_batch syzkaller/managers/linux-4-14/kernel/kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks syzkaller/managers/linux-4-14/kernel/kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks syzkaller/managers/linux-4-14/kernel/kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x88b/0x1180 syzkaller/managers/linux-4-14/kernel/kernel/rcu/tree.c:2946 __do_softirq+0x24d/0x9ff syzkaller/managers/linux-4-14/kernel/kernel/softirq.c:288 The buggy address belongs to the object at ffff8880b55cbb40 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff8880b55cbb40, ffff8880b55cbbc0) The buggy address belongs to the page: page:ffffea0002d572c0 count:1 mapcount:0 mapping:ffff8880b55cb000 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880b55cb000 0000000000000000 0000000100000015 raw: ffffea0002d038e0 ffffea0002d103a0 ffff88813fe80640 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b55cba00: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc ffff8880b55cba80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880b55cbb00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8880b55cbb80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880b55cbc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================