bisecting fixing commit since 811218eceeaa7618652e1b8d11caeff67ab42072 building syzkaller on a52ee10ae11c1342cfca60cf3957619bcf92bd1a testing commit 811218eceeaa7618652e1b8d11caeff67ab42072 with gcc (GCC) 8.4.1 20210217 kernel signature: d97ef7795d549b676e7e3f2ba7c11e02dd005f0e3875adf2c8710b465b4d2a53 run #0: crashed: KASAN: use-after-free Read in chrdev_open run #1: crashed: KASAN: use-after-free Read in chrdev_open run #2: crashed: KASAN: use-after-free Read in chrdev_open run #3: crashed: KASAN: use-after-free Read in chrdev_open run #4: crashed: KASAN: use-after-free Read in chrdev_open run #5: crashed: KASAN: use-after-free Read in chrdev_open run #6: crashed: KASAN: use-after-free Read in chrdev_open run #7: crashed: KASAN: use-after-free Read in chrdev_open run #8: crashed: KASAN: use-after-free Read in chrdev_open run #9: crashed: KASAN: use-after-free Read in chrdev_open run #10: crashed: KASAN: use-after-free Read in chrdev_open run #11: crashed: KASAN: use-after-free Read in chrdev_open run #12: crashed: KASAN: use-after-free Read in chrdev_open run #13: crashed: KASAN: use-after-free Read in cd_forget run #14: crashed: KASAN: use-after-free Read in cd_forget run #15: crashed: KASAN: use-after-free Read in chrdev_open run #16: crashed: KASAN: use-after-free Read in chrdev_open run #17: crashed: KASAN: use-after-free Read in chrdev_open run #18: crashed: KASAN: use-after-free Read in chrdev_open run #19: crashed: KASAN: use-after-free Read in chrdev_open testing current HEAD 030194a5b292bb7613407668d85af0b987bb9839 testing commit 030194a5b292bb7613407668d85af0b987bb9839 with gcc (GCC) 8.4.1 20210217 kernel signature: 5d1e4a5ce8bb2b7cbbac71cf12572440ccce1e2843fb7e35b166ddcc8fd6322f all runs: crashed: KASAN: use-after-free Read in chrdev_open revisions tested: 2, total time: 21m50.884303656s (build: 15m6.457630801s, test: 6m24.440084988s) the crash still happens on HEAD commit msg: Linux 4.19.180 crash: KASAN: use-after-free Read in chrdev_open wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready ================================================================== BUG: KASAN: use-after-free in __list_add_valid+0x7d/0xb0 lib/list_debug.c:23 Read of size 8 at addr ffff8880816ac600 by task syz-executor.5/10017 CPU: 1 PID: 10017 Comm: syz-executor.5 Not tainted 4.19.180-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 __list_add_valid+0x7d/0xb0 lib/list_debug.c:23 __list_add include/linux/list.h:60 [inline] list_add include/linux/list.h:79 [inline] chrdev_open+0x382/0x5c0 fs/char_dev.c:405 do_dentry_open+0x3f1/0x1020 fs/open.c:796 vfs_open+0x9a/0xc0 fs/open.c:902 do_last fs/namei.c:3421 [inline] path_openat+0x925/0x2900 fs/namei.c:3537 do_filp_open+0x177/0x250 fs/namei.c:3567 do_sys_open+0x1dc/0x350 fs/open.c:1085 ksys_open include/linux/syscalls.h:1276 [inline] __do_sys_creat fs/open.c:1143 [inline] __se_sys_creat fs/open.c:1141 [inline] __x64_sys_creat+0x5c/0x80 fs/open.c:1141 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465b09 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f34dac95188 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 000000000056c158 RCX: 0000000000465b09 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0 RBP: 00000000004b069f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c158 R13: 00007ffe207d369f R14: 00007f34dac95300 R15: 0000000000022000 Allocated by task 9926: 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 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x390 mm/slab.c:3559 fuse_alloc_inode+0x1c/0x3b0 fs/fuse/inode.c:87 alloc_inode+0x56/0x150 fs/inode.c:211 iget5_locked fs/inode.c:1131 [inline] iget5_locked+0x4b/0xb0 fs/inode.c:1124 fuse_iget+0x196/0x700 fs/fuse/inode.c:307 fuse_lookup_name+0x343/0x590 fs/fuse/dir.c:341 fuse_lookup+0xf3/0x3b0 fs/fuse/dir.c:368 fuse_atomic_open+0x197/0x2f0 fs/fuse/dir.c:508 atomic_open fs/namei.c:3073 [inline] lookup_open+0xde5/0x1d00 fs/namei.c:3205 do_last fs/namei.c:3327 [inline] path_openat+0xf26/0x2900 fs/namei.c:3537 do_filp_open+0x177/0x250 fs/namei.c:3567 do_sys_open+0x1dc/0x350 fs/open.c:1085 ksys_open include/linux/syscalls.h:1276 [inline] __do_sys_creat fs/open.c:1143 [inline] __se_sys_creat fs/open.c:1141 [inline] __x64_sys_creat+0x5c/0x80 fs/open.c:1141 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe 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 __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3765 fuse_i_callback+0x17/0x20 fs/fuse/inode.c:116 __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+0x25f/0x919 kernel/softirq.c:292 The buggy address belongs to the object at ffff8880816ac280 which belongs to the cache fuse_inode of size 1264 The buggy address is located 896 bytes inside of 1264-byte region [ffff8880816ac280, ffff8880816ac770) The buggy address belongs to the page: page:ffffea000205ab00 count:1 mapcount:0 mapping:ffff8880b157d9c0 index:0xffff8880816acffe flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea00020597c8 ffffea000205ae48 ffff8880b157d9c0 raw: ffff8880816acffe ffff8880816ac280 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880816ac500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880816ac580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880816ac600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880816ac680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880816ac700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ==================================================================