================================================================== BUG: KASAN: use-after-free in ext4_data_block_valid+0x27f/0x2d0 fs/ext4/block_validity.c:211 Read of size 8 at addr ffff88821545c5c8 by task systemd/1 CPU: 0 PID: 1 Comm: systemd 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 ext4_data_block_valid+0x27f/0x2d0 fs/ext4/block_validity.c:211 __check_block_validity.constprop.0+0xba/0x200 fs/ext4/inode.c:410 ext4_map_blocks+0xd96/0x1610 fs/ext4/inode.c:600 ext4_getblk+0x314/0x3f0 fs/ext4/inode.c:980 ext4_bread_batch+0x78/0x340 fs/ext4/inode.c:1050 ext4_find_entry+0x43e/0xca0 fs/ext4/namei.c:1442 ext4_lookup fs/ext4/namei.c:1584 [inline] ext4_lookup+0x10c/0x550 fs/ext4/namei.c:1560 lookup_slow+0x213/0x410 fs/namei.c:1696 walk_component+0x648/0x1bc0 fs/namei.c:1825 link_path_walk+0x717/0xed0 fs/namei.c:2154 path_openat+0x16e/0x3c50 fs/namei.c:3568 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 RIP: 0033:0x7faea1d8d85d RSP: 002b:00007ffef5e6bfa0 EFLAGS: 00000293 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007ffef5e6c030 RCX: 00007faea1d8d85d RDX: 0000000000000001 RSI: 00000000000a0100 RDI: 0000559904f565a0 RBP: 0000000000000008 R08: 000055990502b9f9 R09: 0000000000000020 R10: 0000000000000000 R11: 0000000000000293 R12: 0000559904f565b4 R13: 0000559905092d30 R14: 00007ffef5e6bfc0 R15: 000055990502b9d0 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 add_system_zone+0x2ae/0x600 fs/ext4/block_validity.c:85 ext4_setup_system_zone+0x2e2/0x470 fs/ext4/block_validity.c:169 ext4_fill_super+0x7518/0xbaa0 fs/ext4/super.c:4397 mount_bdev+0x2bc/0x370 fs/super.c:1134 mount_fs+0x92/0x2a0 fs/super.c:1237 vfs_kern_mount.part.0+0x5b/0x3c0 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2549 [inline] do_mount+0x3c9/0x24f0 fs/namespace.c:2879 SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3072 do_mount_root+0x30/0x1b0 init/do_mounts.c:366 mount_block_root+0x2c0/0x59d init/do_mounts.c:395 mount_root+0x1c4/0x1f3 init/do_mounts.c:540 prepare_namespace+0x1d6/0x212 init/do_mounts.c:599 kernel_init_freeable+0x509/0x526 init/main.c:1091 kernel_init+0xd/0x15b init/main.c:998 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Freed by task 11080: 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 ext4_release_system_zone+0x68/0xe0 fs/ext4/block_validity.c:187 ext4_setup_system_zone+0x3a3/0x470 fs/ext4/block_validity.c:151 ext4_remount+0xf70/0x1d50 fs/ext4/super.c:5355 do_remount_sb+0x150/0x530 fs/super.c:868 do_remount fs/namespace.c:2370 [inline] do_mount+0x12d2/0x24f0 fs/namespace.c:2870 SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3072 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff88821545c5b0 which belongs to the cache ext4_system_zone of size 40 The buggy address is located 24 bytes inside of 40-byte region [ffff88821545c5b0, ffff88821545c5d8) The buggy address belongs to the page: page:ffffea0008551700 count:1 mapcount:0 mapping:ffff88821545c000 index:0xffff88821545cfb9 flags: 0x57ffe0000000100(slab) raw: 057ffe0000000100 ffff88821545c000 ffff88821545cfb9 000000010000001b raw: ffff888219545d38 ffff888219545d38 ffff8880a61c7c00 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88821545c480: fb fc fc fb fb fb fb fb fc fc fb fb fb fb fb fc ffff88821545c500: fc fb fb fb fb fb fc fc fb fb fb fb fb fc fc fb >ffff88821545c580: fb fb fb fb fc fc fb fb fb fb fb fc fc fc fc fc ^ ffff88821545c600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88821545c680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== EXT4-fs (sda1): re-mounted. Opts: noinit_itable,noblock_validity,