audit: type=1800 audit(1588399496.787:9): pid=6421 uid=0 auid=0 ses=5 subj=system_u:system_r:kernel_t:s0 op=collect_data cause=failed(directio) comm="syz-executor240" name="file0" dev="sda1" ino=15703 res=0 MINIX-fs: mounting unchecked file system, running fsck is recommended Process accounting resumed ================================================================== BUG: KASAN: use-after-free in add_chain fs/minix/itree_common.c:14 [inline] BUG: KASAN: use-after-free in get_branch fs/minix/itree_common.c:52 [inline] BUG: KASAN: use-after-free in get_block+0x1047/0x1300 fs/minix/itree_common.c:160 Read of size 2 at addr ffff8880a0184bb8 by task syz-executor240/6421 CPU: 0 PID: 6421 Comm: syz-executor240 Not tainted 4.19.119-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.cold+0x7c/0x212 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+0x88/0x2b9 mm/kasan/report.c:396 add_chain fs/minix/itree_common.c:14 [inline] get_branch fs/minix/itree_common.c:52 [inline] get_block+0x1047/0x1300 fs/minix/itree_common.c:160 minix_get_block+0xe5/0x110 fs/minix/inode.c:379 __block_write_begin_int+0x480/0x17a0 fs/buffer.c:1978 __block_write_begin fs/buffer.c:2028 [inline] block_write_begin+0x58/0x2e0 fs/buffer.c:2087 minix_write_begin+0x35/0xe0 fs/minix/inode.c:415 generic_perform_write+0x1f8/0x4d0 mm/filemap.c:3162 __generic_file_write_iter+0x24c/0x610 mm/filemap.c:3287 generic_file_write_iter+0x37f/0x729 mm/filemap.c:3315 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x512/0x760 fs/read_write.c:487 __kernel_write+0x109/0x370 fs/read_write.c:506 do_acct_process+0xcd8/0x10e0 kernel/acct.c:520 slow_acct_process kernel/acct.c:579 [inline] acct_process+0x517/0x5c0 kernel/acct.c:605 do_exit+0x1738/0x2f30 kernel/exit.c:870 do_group_exit+0x125/0x350 kernel/exit.c:983 __do_sys_exit_group kernel/exit.c:994 [inline] __se_sys_exit_group kernel/exit.c:992 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:992 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x444648 Code: Bad RIP value. RSP: 002b:00007ffe23396318 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 0000000000444648 RDX: 0000000000000001 RSI: 000000000000003c RDI: 0000000000000001 RBP: 00000000004c78f0 R08: 00000000000000e7 R09: ffffffffffffffd4 R10: 00007ffe23396230 R11: 0000000000000246 R12: 0000000000000001 R13: 00000000006da5e0 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 3684: set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:531 kmem_cache_alloc+0x127/0x710 mm/slab.c:3559 getname_flags fs/namei.c:140 [inline] getname_flags+0xd2/0x5b0 fs/namei.c:129 getname fs/namei.c:211 [inline] user_path_create fs/namei.c:3696 [inline] do_mkdirat+0x8d/0x280 fs/namei.c:3834 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 3684: set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/kasan.c:521 __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x7f/0x260 mm/slab.c:3765 putname+0xe1/0x120 fs/namei.c:261 filename_parentat.isra.0+0x3a3/0x410 fs/namei.c:2399 filename_create+0x9e/0x4a0 fs/namei.c:3621 user_path_create fs/namei.c:3696 [inline] do_mkdirat+0xa0/0x280 fs/namei.c:3834 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a0184540 which belongs to the cache names_cache of size 4096 The buggy address is located 1656 bytes inside of 4096-byte region [ffff8880a0184540, ffff8880a0185540) The buggy address belongs to the page: page:ffffea0002806100 count:1 mapcount:0 mapping:ffff88821bc46800 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea00027cce88 ffffea00027cd808 ffff88821bc46800 raw: 0000000000000000 ffff8880a0184540 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a0184a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a0184b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a0184b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a0184c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a0184c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================