bisecting fixing commit since 811218eceeaa7618652e1b8d11caeff67ab42072 building syzkaller on a5f86b15f4f60350198e4b98fb7451d45d38a186 testing commit 811218eceeaa7618652e1b8d11caeff67ab42072 with gcc (GCC) 8.4.1 20210217 kernel signature: 01cedaa1482e8079dc81f36fb25f17426a723a4ed75d0281d9e2ae3976d5521d run #0: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #1: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #2: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #3: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #4: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #5: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #6: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #7: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #8: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #9: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #10: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #11: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #12: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #13: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #14: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #15: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #16: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #17: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #18: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #19: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data testing current HEAD 830a059cbba6832c11fefc0894c7ec7a27f75734 testing commit 830a059cbba6832c11fefc0894c7ec7a27f75734 with gcc (GCC) 8.4.1 20210217 kernel signature: 88b095028430aa34001d4a882530f62bf1eb7bd2fa2299a086770a888b0bdbc2 run #0: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #1: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #2: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #3: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #4: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #5: crashed: general protection fault in find_entry run #6: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #7: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #8: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #9: crashed: KASAN: use-after-free Write in ext4_write_inline_data revisions tested: 2, total time: 21m55.492923429s (build: 14m59.35878524s, test: 6m35.824234367s) the crash still happens on HEAD commit msg: Linux 4.19.186 crash: KASAN: use-after-free Write in ext4_write_inline_data EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready ================================================================== wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 BUG: KASAN: use-after-free in memcpy include/linux/string.h:377 [inline] BUG: KASAN: use-after-free in ext4_write_inline_data.isra.4+0x27a/0x480 fs/ext4/inline.c:245 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 Write of size 70 at addr ffff88809cb0d4ef by task syz-executor.4/9826 CPU: 0 PID: 9826 Comm: syz-executor.4 Not tainted 4.19.186-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 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13c/0x1b0 mm/kasan/kasan.c:267 memcpy+0x37/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:377 [inline] ext4_write_inline_data.isra.4+0x27a/0x480 fs/ext4/inline.c:245 ext4_write_inline_data_end+0x1df/0x530 fs/ext4/inline.c:754 ext4_write_end+0x167/0xb10 fs/ext4/inode.c:1423 ext4_da_write_end+0x622/0x9b0 fs/ext4/inode.c:3170 generic_perform_write+0x2e3/0x480 mm/filemap.c:3181 __generic_file_write_iter+0x205/0x590 mm/filemap.c:3295 ext4_file_write_iter+0x281/0xe50 fs/ext4/file.c:272 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x443/0x890 fs/read_write.c:487 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready vfs_write+0x150/0x4d0 fs/read_write.c:549 ksys_write+0x103/0x260 fs/read_write.c:599 __do_sys_write fs/read_write.c:611 [inline] __se_sys_write fs/read_write.c:608 [inline] __x64_sys_write+0x6e/0xb0 fs/read_write.c:608 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:00007f90cd8ff188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465b09 RDX: 0000000000000082 RSI: 0000000020000180 RDI: 0000000000000003 RBP: 00000000004b069f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007fff4bec80af R14: 00007f90cd8ff300 R15: 0000000000022000 Allocated by task 7779: 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] syslog_print kernel/printk/printk.c:1337 [inline] do_syslog kernel/printk/printk.c:1505 [inline] do_syslog+0x77d/0x11a0 kernel/printk/printk.c:1479 kmsg_read+0x65/0x80 fs/proc/kmsg.c:40 proc_reg_read+0x1a1/0x240 fs/proc/inode.c:231 __vfs_read+0xe3/0x880 fs/read_write.c:416 vfs_read+0xff/0x300 fs/read_write.c:452 ksys_read+0x103/0x260 fs/read_write.c:579 __do_sys_read fs/read_write.c:589 [inline] __se_sys_read fs/read_write.c:587 [inline] __x64_sys_read+0x6e/0xb0 fs/read_write.c:587 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7779: 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 syslog_print_all kernel/printk/printk.c:1467 [inline] do_syslog kernel/printk/printk.c:1519 [inline] do_syslog+0x133/0x11a0 kernel/printk/printk.c:1479 kmsg_read+0x65/0x80 fs/proc/kmsg.c:40 proc_reg_read+0x1a1/0x240 fs/proc/inode.c:231 __vfs_read+0xe3/0x880 fs/read_write.c:416 vfs_read+0xff/0x300 fs/read_write.c:452 ksys_read+0x103/0x260 fs/read_write.c:579 __do_sys_read fs/read_write.c:589 [inline] __se_sys_read fs/read_write.c:587 [inline] __x64_sys_read+0x6e/0xb0 fs/read_write.c:587 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809cb0d200 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 751 bytes inside of 1024-byte region [ffff88809cb0d200, ffff88809cb0d600) The buggy address belongs to the page: page:ffffea000272c300 count:1 mapcount:0 mapping:ffff88813bff6ac0 index:0x0 compound_mapcount: 0 ieee80211 phy10: Selected rate control algorithm 'minstrel_ht' flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea00026e1e88 ffffea0002718e88 ffff88813bff6ac0 raw: 0000000000000000 ffff88809cb0c000 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809cb0d380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809cb0d400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809cb0d480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809cb0d500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809cb0d580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================