bisecting fixing commit since 13af6c74b14a883366e7702c40c52ff548096e7f building syzkaller on 96dd36234d97bbf6b403f3a7f03cfc0296422879 testing commit 13af6c74b14a883366e7702c40c52ff548096e7f with gcc (GCC) 8.1.0 kernel signature: cc6004aedfc21791d1eab7f86c55f1139d58df56137048a35f1b098a239363e0 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: crashed: KASAN: use-after-free Read in skb_dequeue run #3: crashed: KASAN: use-after-free Read in hci_dev_reset run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK reproducer seems to be flaky testing current HEAD 3207316b3beec7e38e5dbe2f463df0cec71e0b97 testing commit 3207316b3beec7e38e5dbe2f463df0cec71e0b97 with gcc (GCC) 8.1.0 kernel signature: 756e310009765733a99bfccecdb590c5a9aef9fc54a30eb9dd2107e53cbfa45e run #0: crashed: KASAN: use-after-free Read in skb_dequeue run #1: crashed: KASAN: use-after-free Read in skb_dequeue run #2: crashed: KASAN: use-after-free Read in hci_dev_reset run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK Reproducer flagged being flaky revisions tested: 2, total time: 34m23.922080994s (build: 17m13.943819651s, test: 16m34.868006422s) the crash still happens on HEAD commit msg: Linux 4.19.164 crash: KASAN: use-after-free Read in hci_dev_reset Bluetooth: hci4: command 0x0419 tx timeout IPVS: ftp: loaded support on port[0] = 21 chnl_net:caif_netlink_parms(): no params data found ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x31e1/0x47c0 kernel/locking/lockdep.c:3294 Read of size 8 at addr ffff8881f37cc600 by task syz-executor.3/17458 CPU: 1 PID: 17458 Comm: syz-executor.3 Not tainted 4.19.164-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 bridge0: port 1(bridge_slave_0) entered blocking state kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x307 mm/kasan/report.c:412 bridge0: port 1(bridge_slave_0) entered disabled state __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __lock_acquire+0x31e1/0x47c0 kernel/locking/lockdep.c:3294 device bridge_slave_0 entered promiscuous mode lock_acquire+0x180/0x3a0 kernel/locking/lockdep.c:3907 bridge0: port 2(bridge_slave_1) entered blocking state __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0xf5/0x1200 kernel/locking/mutex.c:1072 bridge0: port 2(bridge_slave_1) entered disabled state device bridge_slave_1 entered promiscuous mode bond0: Enslaving bond_slave_0 as an active interface with an up link 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 bond0: Enslaving bond_slave_1 as an active interface with an up link hci_sock_ioctl+0x258/0x600 net/bluetooth/hci_sock.c:1028 IPv6: ADDRCONF(NETDEV_UP): team_slave_0: link is not ready sock_do_ioctl+0xd9/0x230 net/socket.c:950 team0: Port device team_slave_0 added IPv6: ADDRCONF(NETDEV_UP): team_slave_1: link is not ready sock_ioctl+0x281/0x500 net/socket.c:1074 team0: Port device team_slave_1 added vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0x196/0x10c0 fs/ioctl.c:688 batman_adv: batadv0: Adding interface: batadv_slave_0 batman_adv: batadv0: The MTU of interface batadv_slave_0 is too small (1500) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem. 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 batman_adv: batadv0: Not using interface batadv_slave_0 (retrying later): interface not active RIP: 0033:0x45cc79 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:00007fd075212c78 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: 00007ffe5949073f R14: 00007fd0752139c0 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 __vhci_create_device+0x269/0x4f0 drivers/bluetooth/hci_vhci.c:139 batman_adv: batadv0: Adding interface: batadv_slave_1 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 9: 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 batman_adv: batadv0: The MTU of interface batadv_slave_1 is too small (1500) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem. __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 batman_adv: batadv0: Not using interface batadv_slave_1 (retrying later): interface not active The buggy address belongs to the object at ffff8881f37cc580 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 128 bytes inside of 512-byte region [ffff8881f37cc580, ffff8881f37cc780) The buggy address belongs to the page: page:ffffea0007cdf300 count:1 mapcount:0 mapping:ffff8881f6400940 index:0xffff8881f37ccd00 flags: 0x17ffe0000000100(slab) raw: 017ffe0000000100 ffffea00076db748 ffffea000768a448 ffff8881f6400940 raw: ffff8881f37ccd00 ffff8881f37cc080 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881f37cc500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881f37cc580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881f37cc600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ IPv6: ADDRCONF(NETDEV_UP): bridge_slave_0: link is not ready ffff8881f37cc680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881f37cc700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================