audit: type=1800 audit(1588397732.318:9): pid=6595 uid=0 auid=0 ses=5 subj=system_u:system_r:kernel_t:s0 op="collect_data" cause="failed(directio)" comm="syz-executor162" name="file0" dev="sda1" ino=15712 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+0xe7c/0x10f0 fs/minix/itree_common.c:160 Read of size 2 at addr ffff8880a34d3bb8 by task syz-executor162/6595 CPU: 0 PID: 6595 Comm: syz-executor162 Not tainted 4.14.177-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+0x13e/0x194 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1e2 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+0xa9/0x2ae mm/kasan/report.c:393 add_chain fs/minix/itree_common.c:14 [inline] get_branch fs/minix/itree_common.c:52 [inline] get_block+0xe7c/0x10f0 fs/minix/itree_common.c:160 minix_get_block+0xd6/0x100 fs/minix/inode.c:379 __block_write_begin_int+0x337/0x1030 fs/buffer.c:2038 __block_write_begin fs/buffer.c:2088 [inline] block_write_begin+0x58/0x260 fs/buffer.c:2147 minix_write_begin+0x35/0xc0 fs/minix/inode.c:415 generic_perform_write+0x1c9/0x420 mm/filemap.c:3047 __generic_file_write_iter+0x227/0x590 mm/filemap.c:3172 generic_file_write_iter+0x2fa/0x650 mm/filemap.c:3200 call_write_iter include/linux/fs.h:1778 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x44e/0x630 fs/read_write.c:482 __kernel_write+0xf5/0x330 fs/read_write.c:501 do_acct_process+0xb49/0xf60 kernel/acct.c:520 slow_acct_process kernel/acct.c:579 [inline] acct_process+0x38a/0x422 kernel/acct.c:605 do_exit+0x1712/0x2b00 kernel/exit.c:848 do_group_exit+0x100/0x310 kernel/exit.c:955 SYSC_exit_group kernel/exit.c:966 [inline] SyS_exit_group+0x19/0x20 kernel/exit.c:964 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x448648 RSP: 002b:00007ffc6f8ec8d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000448648 RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 RBP: 00000000004cb9d0 R08: 00000000000000e7 R09: ffffffffffffffd4 R10: 00007ffc6f8ec7f0 R11: 0000000000000246 R12: 0000000000000001 R13: 00000000006e47e0 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 1: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529 kmem_cache_alloc+0x127/0x770 mm/slab.c:3552 kmem_cache_zalloc include/linux/slab.h:651 [inline] get_empty_filp+0x86/0x3e0 fs/file_table.c:123 path_openat+0x8d/0x3c50 fs/namei.c:3545 do_filp_open+0x18e/0x250 fs/namei.c:3603 do_sys_open+0x29d/0x3f0 fs/open.c:1081 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 17: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x792/0x1190 kernel/rcu/tree.c:2946 __do_softirq+0x254/0x9bf kernel/softirq.c:288 The buggy address belongs to the object at ffff8880a34d3a80 which belongs to the cache filp of size 456 The buggy address is located 312 bytes inside of 456-byte region [ffff8880a34d3a80, ffff8880a34d3c48) The buggy address belongs to the page: page:ffffea00028d34c0 count:1 mapcount:0 mapping:ffff8880a34d3080 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff8880a34d3080 0000000000000000 0000000100000006 raw: ffffea00028d3520 ffffea0002983860 ffff8880aa587b40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a34d3a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a34d3b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a34d3b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a34d3c00: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc ffff8880a34d3c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================