bisecting fixing commit since 258f0cf7ac3b788a14c0d01aab3c4aea02f8c86e building syzkaller on 37bccd4ed9e71025cd84e857f9ffca4ec8451c6b testing commit 258f0cf7ac3b788a14c0d01aab3c4aea02f8c86e with gcc (GCC) 8.1.0 kernel signature: 8aead69415a54e098f01a56474e2a29afd61125ac6c552c32358def5001619a5 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 Read in tasklet_action_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 tasklet_action_common 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 testing current HEAD 3fc898571b974f9a05e4e5c1fe17b18548207091 testing commit 3fc898571b974f9a05e4e5c1fe17b18548207091 with gcc (GCC) 8.1.0 kernel signature: f0cc6266a93dc63f81e49c911bb0528215a324f7c45d3f0dcf6c98ac8f748172 run #0: crashed: KASAN: use-after-free Read in tasklet_action_common run #1: crashed: KASAN: use-after-free Read in tasklet_action_common run #2: crashed: KASAN: use-after-free Read in tasklet_action_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 bcm_can_tx 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: OK revisions tested: 2, total time: 38m7.470235242s (build: 17m45.647641639s, test: 19m56.408552625s) the crash still happens on HEAD commit msg: Linux 4.19.128 crash: KASAN: use-after-free Read in tasklet_action_common ================================================================== BUG: KASAN: use-after-free in tasklet_action_common.isra.14+0x400/0x4c0 kernel/softirq.c:515 Read of size 8 at addr ffff8880918d8110 by task syz-executor.5/9953 CPU: 1 PID: 9953 Comm: syz-executor.5 Not tainted 4.19.128-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+0x123/0x177 lib/dump_stack.c:118 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 tasklet_action_common.isra.14+0x400/0x4c0 kernel/softirq.c:515 tasklet_action+0x4b/0x70 kernel/softirq.c:540 __do_softirq+0x260/0x92d kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1092 do_softirq.part.13+0x126/0x160 kernel/softirq.c:336 do_softirq kernel/softirq.c:328 [inline] __local_bh_enable_ip+0x21d/0x260 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:1800 [inline] bcm_release+0x3fe/0x530 net/can/bcm.c:1572 __sock_release+0xc2/0x290 net/socket.c:579 sock_close+0x10/0x20 net/socket.c:1140 __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+0x1a9/0x200 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:0x416621 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 04 1b 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007fff95835aa0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000416621 RDX: 0000000000000000 RSI: 0000000000000081 RDI: 0000000000000004 RBP: 0000000000000000 R08: 0000000000790838 R09: 0000000000000000 R10: 00007fff95835b80 R11: 0000000000000293 R12: 0000000000790840 R13: 0000000000000003 R14: ffffffffffffffff R15: 000000000078c0ec Allocated by task 9961: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kmem_cache_alloc_trace+0x152/0x740 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:939 [inline] bcm_sendmsg+0x1f21/0x4467 net/can/bcm.c:1378 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:632 ___sys_sendmsg+0x647/0x950 net/socket.c:2115 __sys_sendmsg+0xd9/0x180 net/socket.c:2153 __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2160 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9953: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 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:768 bcm_release+0xe7/0x530 net/can/bcm.c:1530 __sock_release+0xc2/0x290 net/socket.c:579 sock_close+0x10/0x20 net/socket.c:1140 __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+0x1a9/0x200 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 ffff8880918d8040 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 208 bytes inside of 1024-byte region [ffff8880918d8040, ffff8880918d8440) The buggy address belongs to the page: page:ffffea0002463600 count:1 mapcount:0 mapping:ffff88812c29cac0 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea000209fa08 ffffea00029e2808 ffff88812c29cac0 raw: 0000000000000000 ffff8880918d8040 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880918d8000: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880918d8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880918d8100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880918d8180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880918d8200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================