bisecting fixing commit since 13af6c74b14a883366e7702c40c52ff548096e7f building syzkaller on 96dd36234d97bbf6b403f3a7f03cfc0296422879 testing commit 13af6c74b14a883366e7702c40c52ff548096e7f with gcc (GCC) 8.1.0 kernel signature: 481ab489ebec48fbc228a84c64ae3bea18d87d4acc5eb013652f88f13cdd2817 run #0: crashed: KASAN: use-after-free Read in skb_dequeue run #1: crashed: general protection fault in __queue_work run #2: crashed: KASAN: use-after-free Read in skb_dequeue run #3: crashed: KASAN: use-after-free Read in hci_dev_reset run #4: crashed: KASAN: use-after-free Read in skb_dequeue run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK testing current HEAD f6d5cb9e2c06f7d583dd9f4f7cca21d13d78c32a testing commit f6d5cb9e2c06f7d583dd9f4f7cca21d13d78c32a with gcc (GCC) 8.1.0 kernel signature: a4b3518974048e1150fdbd0f89f5a7804541319c6a3e4f0021066bed024227ca run #0: crashed: KASAN: use-after-free Read in hci_dev_reset run #1: crashed: KASAN: use-after-free Read in hci_dev_reset run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK revisions tested: 2, total time: 41m12.804655476s (build: 20m21.33905604s, test: 19m25.455236679s) the crash still happens on HEAD commit msg: Linux 4.19.142 crash: KASAN: use-after-free Read in hci_dev_reset ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x31e1/0x47c0 kernel/locking/lockdep.c:3294 Read of size 8 at addr ffff8880814a35c0 by task syz-executor.5/17479 IPVS: ftp: loaded support on port[0] = 21 CPU: 1 PID: 17479 Comm: syz-executor.5 Not tainted 4.19.142-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+0x17c/0x22a lib/dump_stack.c:118 print_address_description.cold.6+0x9/0x211 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x307 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __lock_acquire+0x31e1/0x47c0 kernel/locking/lockdep.c:3294 lock_acquire+0x180/0x3a0 kernel/locking/lockdep.c:3907 __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0xf5/0x1200 kernel/locking/mutex.c:1072 chnl_net:caif_netlink_parms(): no params data found mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 drain_workqueue+0x22/0x3a0 kernel/workqueue.c:2823 hci_dev_do_reset net/bluetooth/hci_core.c:1764 [inline] hci_dev_reset+0x118/0x300 net/bluetooth/hci_core.c:1807 hci_sock_ioctl+0x258/0x600 net/bluetooth/hci_sock.c:1028 sock_do_ioctl+0xd9/0x230 net/socket.c:950 sock_ioctl+0x281/0x500 net/socket.c:1074 bridge0: port 1(bridge_slave_0) entered blocking state bridge0: port 1(bridge_slave_0) entered disabled state vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0x196/0x10c0 fs/ioctl.c:688 device bridge_slave_0 entered promiscuous mode bridge0: port 2(bridge_slave_1) entered blocking state bridge0: port 2(bridge_slave_1) entered disabled state device bridge_slave_1 entered promiscuous mode ksys_ioctl+0x62/0x90 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6e/0xb0 fs/ioctl.c:710 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45cc79 bond0: Enslaving bond_slave_0 as an active interface with an up link 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 bond0: Enslaving bond_slave_1 as an active interface with an up link RSP: 002b:00007fd13948cc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000001d300 RCX: 000000000045cc79 RDX: 0000000000000000 RSI: 00000000400448cb RDI: 0000000000000004 RBP: 000000000078bf40 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bf0c R13: 00007ffd7972d2df R14: 00007fd13948d9c0 R15: 000000000078bf0c Allocated by task 19: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:553 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:538 __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15d/0x3d0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] kzalloc include/linux/slab.h:709 [inline] __alloc_workqueue_key+0x5b9/0xbb0 kernel/workqueue.c:4087 hci_register_dev+0x185/0x750 net/bluetooth/hci_core.c:3179 IPv6: ADDRCONF(NETDEV_UP): team_slave_0: link is not ready __vhci_create_device+0x269/0x4f0 drivers/bluetooth/hci_vhci.c:139 team0: Port device team_slave_0 added vhci_create_device drivers/bluetooth/hci_vhci.c:163 [inline] vhci_open_timeout+0x34/0x50 drivers/bluetooth/hci_vhci.c:319 process_one_work+0x7b9/0x15a0 kernel/workqueue.c:2155 worker_thread+0x85/0xb60 kernel/workqueue.c:2298 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Freed by task 17492: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x13c/0x220 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x220 mm/slab.c:3822 rcu_free_wq+0x99/0xf0 kernel/workqueue.c:3339 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0x93a/0x19b0 kernel/rcu/tree.c:2881 __do_softirq+0x25e/0x92d kernel/softirq.c:292 IPv6: ADDRCONF(NETDEV_UP): team_slave_1: link is not ready The buggy address belongs to the object at ffff8880814a3540 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 128 bytes inside of 512-byte region [ffff8880814a3540, ffff8880814a3740) The buggy address belongs to the page: page:ffffea00020528c0 count:1 mapcount:0 mapping:ffff88812c29c940 index:0xffff8880814a37c0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea00024e4b08 ffffea00025dc888 ffff88812c29c940 raw: ffff8880814a37c0 ffff8880814a3040 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880814a3480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880814a3500: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8880814a3580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880814a3600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880814a3680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================