================================================================== BUG: KASAN: slab-out-of-bounds in __ext4_check_dir_entry+0x2f9/0x340 fs/ext4/dir.c:68 Read of size 2 at addr ffff88808ad82003 by task syz-executor689/6335 CPU: 0 PID: 6335 Comm: syz-executor689 Not tainted 4.14.175-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_check_dir_entry+0x2f9/0x340 fs/ext4/dir.c:68 ext4_readdir+0x822/0x27f0 fs/ext4/dir.c:240 iterate_dir+0x1a0/0x5e0 fs/readdir.c:52 SYSC_getdents64 fs/readdir.c:355 [inline] SyS_getdents64+0x130/0x240 fs/readdir.c:336 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x4402d9 RSP: 002b:00007fff8440f568 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007fff8440f570 RCX: 00000000004402d9 RDX: 00000000c0000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fff8440f570 R08: 65732f636f72702f R09: 65732f636f72702f R10: 000000000000000f R11: 0000000000000246 R12: 0000000000401b60 R13: 0000000000401bf0 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 getname_flags fs/namei.c:138 [inline] getname_flags+0xc8/0x560 fs/namei.c:128 user_path_at_empty+0x2a/0x50 fs/namei.c:2631 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0xd1/0x160 fs/stat.c:185 vfs_lstat include/linux/fs.h:3066 [inline] SYSC_newlstat+0x83/0xe0 fs/stat.c:350 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 1: 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 putname+0xcd/0x110 fs/namei.c:259 filename_lookup+0x23a/0x380 fs/namei.c:2386 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0xd1/0x160 fs/stat.c:185 vfs_lstat include/linux/fs.h:3066 [inline] SYSC_newlstat+0x83/0xe0 fs/stat.c:350 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 ffff88808ad82080 which belongs to the cache names_cache of size 4096 The buggy address is located 125 bytes to the left of 4096-byte region [ffff88808ad82080, ffff88808ad83080) The buggy address belongs to the page: page:ffffea00022b6080 count:1 mapcount:0 mapping:ffff88808ad82080 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff88808ad82080 0000000000000000 0000000100000001 raw: ffffea0002a4f7a0 ffffea0002a31120 ffff8880aa586e40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808ad81f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808ad81f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808ad82000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808ad82080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808ad82100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================