batman_adv: batadv0: Interface deactivated: batadv_slave_0 batman_adv: batadv0: Removing interface: batadv_slave_0 ================================================================== BUG: KASAN: use-after-free in __queue_work+0xa97/0xea0 kernel/workqueue.c:1385 Read of size 4 at addr ffff8881e20bf440 by task syz-executor.3/21154 batman_adv: batadv0: Interface deactivated: batadv_slave_1 CPU: 1 PID: 21154 Comm: syz-executor.3 Not tainted 4.14.217-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x14b/0x1e7 lib/dump_stack.c:58 batman_adv: batadv0: Removing interface: batadv_slave_1 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.7+0x11a/0x2d3 mm/kasan/report.c:409 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:429 __queue_work+0xa97/0xea0 kernel/workqueue.c:1385 queue_work_on+0x140/0x180 kernel/workqueue.c:1490 queue_work include/linux/workqueue.h:491 [inline] req_run+0x2b2/0x590 net/bluetooth/hci_request.c:77 hci_req_run_skb net/bluetooth/hci_request.c:89 [inline] __hci_req_sync+0x297/0x7d0 net/bluetooth/hci_request.c:214 hci_req_sync+0x70/0xb0 net/bluetooth/hci_request.c:285 hci_dev_cmd+0x47f/0x670 net/bluetooth/hci_core.c:1865 hci_sock_ioctl+0x2f0/0x600 net/bluetooth/hci_sock.c:1040 sock_do_ioctl+0x62/0xa0 net/socket.c:974 sock_ioctl+0x251/0x430 net/socket.c:1071 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x180/0xfb0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x74/0x80 fs/ioctl.c:692 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45cc79 RSP: 002b:00007fc670efbc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000001d300 RCX: 000000000045cc79 RDX: 0000000020000000 RSI: 00000000400448de RDI: 0000000000000004 RBP: 000000000078c080 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078c04c R13: 00007ffca583f20f R14: 00007fc670efc9c0 R15: 000000000078c04c Allocated by task 3096: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:551 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:536 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15d/0x410 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:661 [inline] __alloc_workqueue_key+0xf8/0xc80 kernel/workqueue.c:4003 hci_register_dev+0x182/0x750 net/bluetooth/hci_core.c:3099 __vhci_create_device+0x269/0x4f0 drivers/bluetooth/hci_vhci.c:139 vhci_create_device drivers/bluetooth/hci_vhci.c:163 [inline] vhci_open_timeout+0x34/0x50 drivers/bluetooth/hci_vhci.c:319 process_one_work+0x74f/0x1620 kernel/workqueue.c:2116 worker_thread+0xcc/0xed0 kernel/workqueue.c:2250 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Freed by task 21172: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xab/0x190 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 rcu_free_wq+0x99/0xf0 kernel/workqueue.c:3279 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x7a5/0x11e0 kernel/rcu/tree.c:2946 __do_softirq+0x246/0x9b5 kernel/softirq.c:288 The buggy address belongs to the object at ffff8881e20bf2c0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 384 bytes inside of 512-byte region [ffff8881e20bf2c0, ffff8881e20bf4c0) The buggy address belongs to the page: page:ffffea0007882fc0 count:1 mapcount:0 mapping:ffff8881e20bf040 index:0x0 flags: 0x17ffe0000000100(slab) raw: 017ffe0000000100 ffff8881e20bf040 0000000000000000 0000000100000006 raw: ffffea0007777120 ffffea00076bffa0 ffff8881f6000940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881e20bf300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881e20bf380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881e20bf400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881e20bf480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8881e20bf500: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================