bisecting fixing commit since cbfa1702aaf69b2311ea1b35e04f113c48368c67 building syzkaller on 4a77ae0bdc5cd75ebe88ce7c896aae6bbf457a29 testing commit cbfa1702aaf69b2311ea1b35e04f113c48368c67 with gcc (GCC) 8.4.1 20210217 kernel signature: c2658e6ab75118309d6e37d12f5ed920fd85f3f86771ce89bc78394a9e7f2722 run #0: crashed: KASAN: use-after-free Read in tasklet_action run #1: crashed: KASAN: use-after-free Read in tasklet_action run #2: crashed: KASAN: use-after-free Read in tasklet_action run #3: crashed: KASAN: use-after-free Read in tasklet_action run #4: crashed: KASAN: use-after-free Read in tasklet_action run #5: crashed: KASAN: use-after-free Read in tasklet_action run #6: crashed: KASAN: use-after-free Read in tasklet_action run #7: crashed: KASAN: use-after-free Read in tasklet_action run #8: crashed: KASAN: use-after-free Read in tasklet_action run #9: crashed: KASAN: use-after-free Read in tasklet_action run #10: crashed: KASAN: use-after-free Read in tasklet_action run #11: crashed: KASAN: use-after-free Read in tasklet_action run #12: crashed: KASAN: use-after-free Read in tasklet_action run #13: crashed: KASAN: use-after-free Read in tasklet_action run #14: crashed: KASAN: use-after-free Read in tasklet_action run #15: crashed: KASAN: use-after-free Read in tasklet_action run #16: crashed: KASAN: use-after-free Read in tasklet_action run #17: crashed: KASAN: use-after-free Read in tasklet_action run #18: OK run #19: OK testing current HEAD 29c52025152bab4c557d8174da58f1a4c8e70438 testing commit 29c52025152bab4c557d8174da58f1a4c8e70438 with gcc (GCC) 8.4.1 20210217 kernel signature: d00790b85a1fb1bb16224fdb5faad0690be6925fa3579041b89baac896d0bdd6 run #0: crashed: KASAN: use-after-free Read in tasklet_action run #1: crashed: KASAN: use-after-free Read in tasklet_action run #2: crashed: KASAN: use-after-free Read in tasklet_action run #3: crashed: KASAN: use-after-free Read in tasklet_action run #4: crashed: KASAN: use-after-free Read in tasklet_action run #5: crashed: KASAN: use-after-free Read in tasklet_action run #6: crashed: KASAN: use-after-free Read in tasklet_action run #7: crashed: KASAN: use-after-free Read in tasklet_action run #8: basic kernel testing failed: failed to copy test binary to VM: failed to run ["scp" "-P" "22" "-F" "/dev/null" "-o" "UserKnownHostsFile=/dev/null" "-o" "BatchMode=yes" "-o" "IdentitiesOnly=yes" "-o" "StrictHostKeyChecking=no" "-o" "ConnectTimeout=10" "/tmp/syz-executor954658650" "root@10.128.0.34:./syz-executor954658650"]: exit status 1 Connection timed out during banner exchange Connection to 10.128.0.34 port 22 timed out lost connection run #9: basic kernel testing failed: failed to copy test binary to VM: failed to run ["scp" "-P" "22" "-F" "/dev/null" "-o" "UserKnownHostsFile=/dev/null" "-o" "BatchMode=yes" "-o" "IdentitiesOnly=yes" "-o" "StrictHostKeyChecking=no" "-o" "ConnectTimeout=10" "/tmp/syz-executor037622001" "root@10.128.1.114:./syz-executor037622001"]: exit status 1 Connection timed out during banner exchange Connection to 10.128.1.114 port 22 timed out lost connection revisions tested: 2, total time: 36m5.346577584s (build: 14m56.197551114s, test: 20m14.056762179s) the crash still happens on HEAD commit msg: Linux 4.14.221 crash: KASAN: use-after-free Read in tasklet_action random: 7 urandom warning(s) missed due to ratelimiting ================================================================== BUG: KASAN: use-after-free in tasklet_action+0x2aa/0x360 kernel/softirq.c:506 Read of size 8 at addr ffff8881f61a8e90 by task syz-executor.1/8040 CPU: 1 PID: 8040 Comm: syz-executor.1 Not tainted 4.14.221-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 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold.7+0x11a/0x2d3 mm/kasan/report.c:393 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 tasklet_action+0x2aa/0x360 kernel/softirq.c:506 __do_softirq+0x247/0x9a2 kernel/softirq.c:288 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1016 do_softirq kernel/softirq.c:332 [inline] do_softirq+0xee/0x160 kernel/softirq.c:319 __local_bh_enable_ip+0x130/0x150 kernel/softirq.c:185 __raw_write_unlock_bh include/linux/rwlock_api_smp.h:275 [inline] _raw_write_unlock_bh+0x30/0x40 kernel/locking/spinlock.c:352 sock_orphan include/net/sock.h:1715 [inline] bcm_release+0x3cf/0x500 net/can/bcm.c:1582 __sock_release+0xc2/0x2a0 net/socket.c:602 sock_close+0x10/0x20 net/socket.c:1139 __fput+0x232/0x740 fs/file_table.c:210 ____fput+0x9/0x10 fs/file_table.c:244 task_work_run+0xe5/0x170 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x14a/0x190 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x416/0x5b0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x418b5b RSP: 002b:00007ffd544ab3b0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000418b5b RDX: 00000000000f4240 RSI: 00000000005606a8 RDI: 0000000000000004 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000558080 R11: 0000000000000293 R12: 00000000005606a8 R13: 000000000005a0fa R14: 000000000055bf00 R15: 000000000055bf00 Allocated by task 8045: 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 kmem_cache_alloc_trace+0x152/0x3f0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] bcm_tx_setup net/can/bcm.c:952 [inline] bcm_sendmsg+0x199f/0x4560 net/can/bcm.c:1388 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:656 ___sys_sendmsg+0x625/0x920 net/socket.c:2062 __sys_sendmsg+0xc1/0x140 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0xd/0x20 net/socket.c:2103 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 8040: 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 bcm_remove_op+0x1cd/0x240 net/can/bcm.c:781 bcm_release+0xe7/0x500 net/can/bcm.c:1540 __sock_release+0xc2/0x2a0 net/socket.c:602 sock_close+0x10/0x20 net/socket.c:1139 __fput+0x232/0x740 fs/file_table.c:210 ____fput+0x9/0x10 fs/file_table.c:244 task_work_run+0xe5/0x170 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x14a/0x190 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x416/0x5b0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8881f61a8dc0 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 208 bytes inside of 1024-byte region [ffff8881f61a8dc0, ffff8881f61a91c0) The buggy address belongs to the page: page:ffffea0007d86a00 count:1 mapcount:0 mapping:ffff8881f61a8040 index:0x0 compound_mapcount: 0 flags: 0x17ffe0000008100(slab|head) raw: 017ffe0000008100 ffff8881f61a8040 0000000000000000 0000000100000007 raw: ffffea0007629320 ffffea00079f8e20 ffff8881f6000ac0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881f61a8d80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8881f61a8e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881f61a8e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881f61a8f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881f61a8f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================