================================================================== BUG: KASAN: slab-out-of-bounds in __ext4_check_dir_entry+0x2de/0x320 fs/ext4/dir.c:69 Read of size 2 at addr ffff8801cd48a002 by task syz-executor4/6469 CPU: 0 PID: 6469 Comm: syz-executor4 Not tainted 4.16.0-rc7+ #9 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+0x194/0x24d lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report+0x23c/0x360 mm/kasan/report.c:412 __asan_report_load2_noabort+0x14/0x20 mm/kasan/report.c:431 __ext4_check_dir_entry+0x2de/0x320 fs/ext4/dir.c:69 ext4_readdir+0xd00/0x3600 fs/ext4/dir.c:237 iterate_dir+0x1ca/0x530 fs/readdir.c:51 SYSC_getdents64 fs/readdir.c:314 [inline] SyS_getdents64+0x221/0x420 fs/readdir.c:295 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x454e79 RSP: 002b:00007f7c13b15c68 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f7c13b166d4 RCX: 0000000000454e79 RDX: 00000000200015fc RSI: 0000000020001540 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000000a9 R14: 00000000006f3078 R15: 0000000000000000 Allocated by task 2700: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552 __do_kmalloc_node mm/slab.c:3670 [inline] __kmalloc_node+0x47/0x70 mm/slab.c:3677 kmalloc_node include/linux/slab.h:554 [inline] kvmalloc_node+0x99/0xd0 mm/util.c:419 kvmalloc include/linux/mm.h:541 [inline] seq_buf_alloc fs/seq_file.c:29 [inline] seq_read+0x7fc/0x1410 fs/seq_file.c:208 kernfs_fop_read+0x455/0x610 fs/kernfs/file.c:252 __vfs_read+0xef/0xa00 fs/read_write.c:411 vfs_read+0x11e/0x350 fs/read_write.c:447 SYSC_read fs/read_write.c:573 [inline] SyS_read+0xef/0x220 fs/read_write.c:566 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 2700: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527 __cache_free mm/slab.c:3486 [inline] kfree+0xd9/0x260 mm/slab.c:3801 kvfree+0x36/0x60 mm/util.c:438 seq_release+0x51/0x70 fs/seq_file.c:368 kernfs_fop_release+0x10b/0x180 fs/kernfs/file.c:781 __fput+0x327/0x7e0 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 task_work_run+0x199/0x270 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x275/0x2f0 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_64+0x6ec/0x940 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8801cd48a0c0 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 190 bytes to the left of 4096-byte region [ffff8801cd48a0c0, ffff8801cd48b0c0) The buggy address belongs to the page: page:ffffea0007352280 count:1 mapcount:0 mapping:ffff8801cd48a0c0 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801cd48a0c0 0000000000000000 0000000100000001 raw: ffffea00073f74a0 ffffea0006a715a0 ffff8801dac00dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cd489f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801cd489f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801cd48a000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801cd48a080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8801cd48a100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================