bisecting fixing commit since b172b44fcb1771e083aad806fa96f3f60e2ddfac building syzkaller on 58d094047fb1e61df8402ef854bd3bfb97826d6f testing commit b172b44fcb1771e083aad806fa96f3f60e2ddfac compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 852ca8e3fec8a9bb7b1c5c18c9ff523d2a0daf50d794881d385cc9ff49bf2b7e run #0: crashed: KASAN: use-after-free Read in tasklet_action_common run #1: crashed: KASAN: use-after-free Read in bcm_can_tx run #2: crashed: KASAN: use-after-free Write in __tasklet_schedule_common run #3: crashed: KASAN: use-after-free Read in tasklet_action_common run #4: crashed: KASAN: use-after-free Read in tasklet_action_common run #5: crashed: KASAN: use-after-free Read in hrtimer_debug_hint run #6: crashed: KASAN: use-after-free Read in tasklet_action_common run #7: crashed: KASAN: use-after-free Read in tasklet_action_common run #8: crashed: KASAN: use-after-free Read in tasklet_action_common run #9: crashed: KASAN: use-after-free Read in tasklet_action_common run #10: crashed: KASAN: use-after-free Read in tasklet_action_common run #11: crashed: KASAN: use-after-free Read in tasklet_action_common run #12: crashed: KASAN: use-after-free Read in tasklet_action_common run #13: crashed: KASAN: use-after-free Read in tasklet_action_common run #14: crashed: KASAN: use-after-free Read in tasklet_action_common run #15: crashed: KASAN: use-after-free Read in tasklet_action_common run #16: crashed: KASAN: use-after-free Read in tasklet_action_common run #17: crashed: KASAN: use-after-free Read in tasklet_action_common run #18: crashed: KASAN: use-after-free Read in tasklet_action_common run #19: OK testing current HEAD 3f8a27f9e27bd78604c0709224cec0ec85a8b106 testing commit 3f8a27f9e27bd78604c0709224cec0ec85a8b106 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 8e5dd7f03efa302437e0e93dc02446bc762d4f054460cde166022472e79c5f85 all runs: crashed: KASAN: use-after-free Read in tasklet_action_common revisions tested: 2, total time: 39m23.693009175s (build: 16m31.576151335s, test: 22m22.809432874s) the crash still happens on HEAD commit msg: Linux 4.19.211 crash: KASAN: use-after-free Read in tasklet_action_common ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy1 wpan1: encryption failed: -22 ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy1 wpan1: encryption failed: -22 ================================================================== BUG: KASAN: use-after-free in tasklet_action_common.isra.2+0x29f/0x360 kernel/softirq.c:515 Read of size 8 at addr ffff8880aafce9d0 by task syz-executor446/1923 CPU: 1 PID: 1923 Comm: syz-executor446 Not tainted 4.19.211-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/0x226 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 mm/kasan/report.c:412 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:396 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 tasklet_action_common.isra.2+0x29f/0x360 kernel/softirq.c:515 tasklet_action+0x4b/0x70 kernel/softirq.c:540 __do_softirq+0x25f/0x919 kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1092 do_softirq kernel/softirq.c:336 [inline] do_softirq+0xfa/0x170 kernel/softirq.c:323 __local_bh_enable_ip+0x20b/0x250 kernel/softirq.c:189 __raw_write_unlock_bh include/linux/rwlock_api_smp.h:275 [inline] _raw_write_unlock_bh+0x30/0x40 kernel/locking/spinlock.c:344 sock_orphan include/net/sock.h:1805 [inline] bcm_release+0x586/0x750 net/can/bcm.c:1607 __sock_release+0xc2/0x290 net/socket.c:599 sock_close+0x10/0x20 net/socket.c:1214 __fput+0x249/0x7f0 fs/file_table.c:278 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x108/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x185/0x1e0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fe643cb743b Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 03 fd ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 41 fd ff ff 8b 44 RSP: 002b:00007ffebca4eec0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007fe643cb743b RDX: 0000000000000000 RSI: 0000000000000080 RDI: 0000000000000004 RBP: 0000000000000032 R08: 0000000000000000 R09: 00007fe643d4d1ee R10: 00007ffebca4ef20 R11: 0000000000000293 R12: 00007ffebca4ef20 R13: 00007fe643d804dc R14: 00007ffebca4ef40 R15: 00007fe643cb0180 Allocated by task 1925: 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 kmem_cache_alloc_trace+0x152/0x3a0 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] bcm_tx_setup net/can/bcm.c:947 [inline] bcm_sendmsg+0x1a9a/0x4770 net/can/bcm.c:1386 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:661 ___sys_sendmsg+0x647/0x950 net/socket.c:2227 __sys_sendmsg+0xd9/0x180 net/socket.c:2265 __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2272 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 1923: 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 bcm_remove_op+0x1cd/0x240 net/can/bcm.c:775 bcm_release+0x229/0x750 net/can/bcm.c:1561 __sock_release+0xc2/0x290 net/socket.c:599 sock_close+0x10/0x20 net/socket.c:1214 __fput+0x249/0x7f0 fs/file_table.c:278 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x108/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x185/0x1e0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880aafce900 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 208 bytes inside of 1024-byte region [ffff8880aafce900, ffff8880aafced00) The buggy address belongs to the page: page:ffffea0002abf380 count:1 mapcount:0 mapping:ffff88813bff6ac0 index:0xffff8880aafce000 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea000241cb08 ffffea0002474888 ffff88813bff6ac0 raw: ffff8880aafce000 ffff8880aafce000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880aafce880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880aafce900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880aafce980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880aafcea00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880aafcea80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================