================================================================== BUG: KASAN: use-after-free in ext4_data_block_valid+0x279/0x2d0 fs/ext4/block_validity.c:211 Read of size 8 at addr ffff8881d58e0bb0 by task syz-executor.2/1840 CPU: 1 PID: 1840 Comm: syz-executor.2 Not tainted 4.14.146+ #0 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xca/0x134 lib/dump_stack.c:53 print_address_description+0x60/0x226 mm/kasan/report.c:187 __kasan_report.cold+0x1a/0x41 mm/kasan/report.c:316 ext4_data_block_valid+0x279/0x2d0 fs/ext4/block_validity.c:211 __check_block_validity.constprop.0+0xba/0x200 fs/ext4/inode.c:402 ext4_map_blocks+0xdc9/0x1600 fs/ext4/inode.c:592 ext4_getblk+0x344/0x420 fs/ext4/inode.c:972 ext4_bread_batch+0x78/0x340 fs/ext4/inode.c:1042 __ext4_find_entry+0x447/0xcd0 fs/ext4/namei.c:1434 ext4_lookup_entry fs/ext4/namei.c:1533 [inline] ext4_lookup+0x15e/0x5b0 fs/ext4/namei.c:1601 lookup_slow+0x226/0x440 fs/namei.c:1794 mountpoint_last fs/namei.c:2793 [inline] path_mountpoint+0x61c/0x9a0 fs/namei.c:2824 filename_mountpoint+0x17f/0x350 fs/namei.c:2850 SYSC_umount fs/namespace.c:1748 [inline] SyS_umount+0x12e/0xc50 fs/namespace.c:1732 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45c437 RSP: 002b:00007ffde5ed2728 EFLAGS: 00000206 ORIG_RAX: 00000000000000a6 RAX: ffffffffffffffda RBX: 00000000000bcbb3 RCX: 000000000045c437 RDX: 0000000000403520 RSI: 0000000000000002 RDI: 00007ffde5ed27d0 RBP: 0000000000001f14 R08: 0000000000000000 R09: 0000000000000011 R10: 000000000000000a R11: 0000000000000206 R12: 00007ffde5ed3860 R13: 00005555567b7940 R14: 0000000000000000 R15: 00007ffde5ed3860 Allocated by task 1: save_stack mm/kasan/common.c:76 [inline] set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc.part.0+0x53/0xc0 mm/kasan/common.c:495 slab_post_alloc_hook mm/slab.h:439 [inline] slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2800 [inline] kmem_cache_alloc+0xee/0x360 mm/slub.c:2805 add_system_zone+0x29b/0x530 fs/ext4/block_validity.c:85 ext4_setup_system_zone+0x2e2/0x470 fs/ext4/block_validity.c:169 ext4_fill_super+0x65ee/0xb210 fs/ext4/super.c:4354 mount_bdev+0x2b6/0x360 fs/super.c:1149 mount_fs+0x277/0x312 fs/super.c:1255 vfs_kern_mount.part.0+0xc7/0x4a0 fs/namespace.c:1056 vfs_kern_mount fs/namespace.c:1038 [inline] do_new_mount fs/namespace.c:2573 [inline] do_mount+0x3f6/0x26a0 fs/namespace.c:2903 SYSC_mount fs/namespace.c:3119 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3096 do_mount_root init/do_mounts.c:366 [inline] mount_block_root+0x345/0x70a init/do_mounts.c:395 prepare_namespace+0x1d1/0x20d init/do_mounts.c:599 kernel_init_freeable+0x393/0x3b0 init/main.c:1116 kernel_init+0xd/0x164 init/main.c:1023 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:404 0xffffffffffffffff Freed by task 8586: save_stack mm/kasan/common.c:76 [inline] set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x164/0x210 mm/kasan/common.c:457 slab_free_hook mm/slub.c:1407 [inline] slab_free_freelist_hook mm/slub.c:1458 [inline] slab_free mm/slub.c:3039 [inline] kmem_cache_free+0xd7/0x3b0 mm/slub.c:3055 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+0xdfb/0x1d10 fs/ext4/super.c:5305 do_remount_sb2+0x35a/0x5e0 fs/super.c:878 do_remount fs/namespace.c:2388 [inline] do_mount+0x1305/0x26a0 fs/namespace.c:2894 SYSC_mount fs/namespace.c:3119 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3096 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 0xffffffffffffffff The buggy address belongs to the object at ffff8881d58e0b98 which belongs to the cache ext4_system_zone of size 40 The buggy address is located 24 bytes inside of 40-byte region [ffff8881d58e0b98, ffff8881d58e0bc0) The buggy address belongs to the page: page:ffffea0007563800 count:1 mapcount:0 mapping: (null) index:0xffff8881d58e0b60 flags: 0x4000000000000200(slab) raw: 4000000000000200 0000000000000000 ffff8881d58e0b60 0000000180490019 raw: dead000000000100 dead000000000200 ffff8881d9084200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d58e0a80: fb fb fb fb fb fc fc fb fb fb fb fb fc fc fb fb ffff8881d58e0b00: fb fb fb fc fc fb fb fb fb fb fc fc fb fb fb fb >ffff8881d58e0b80: fb fc fc fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8881d58e0c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881d58e0c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================