audit: type=1400 audit(1591929086.766:8): avc: denied { execmem } for pid=6334 comm="syz-executor239" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1 ================================================================== BUG: KASAN: slab-out-of-bounds in __ext4_check_dir_entry+0x2f9/0x340 fs/ext4/dir.c:68 Read of size 2 at addr ffff8880a85d2003 by task syz-executor239/6334 CPU: 0 PID: 6334 Comm: syz-executor239 Not tainted 4.14.184-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+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1dc 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/0x2b9 mm/kasan/report.c:393 __ext4_check_dir_entry+0x2f9/0x340 fs/ext4/dir.c:68 ext4_readdir+0x819/0x27e0 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+0x46/0xbb RIP: 0033:0x440779 RSP: 002b:00007ffc0ab092a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007ffc0ab09350 RCX: 0000000000440779 RDX: 00000000c0002521 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 0000000000000000 R08: 0000000000400ca0 R09: 0000000000400ca0 R10: 000000000000000f R11: 0000000000000246 R12: 0000000000402000 R13: 0000000000402090 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 1: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.0+0x4f/0xd0 mm/kasan/kasan.c:551 kmem_cache_alloc+0x124/0x3c0 mm/slab.c:3552 getname_flags+0xc8/0x550 fs/namei.c:138 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 fs/stat.c:350 [inline] SyS_newlstat+0x83/0xe0 fs/stat.c:344 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 1: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xaf/0x190 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 fs/stat.c:350 [inline] SyS_newlstat+0x83/0xe0 fs/stat.c:344 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8880a85d2ec0 which belongs to the cache names_cache of size 4096 The buggy address is located 3773 bytes to the left of 4096-byte region [ffff8880a85d2ec0, ffff8880a85d3ec0) The buggy address belongs to the page: page:ffffea0002a17480 count:1 mapcount:0 mapping:ffff8880a85d2ec0 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff8880a85d2ec0 0000000000000000 0000000100000001 raw: ffffea00022859a0 ffffea000229d920 ffff8880aa9dacc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a85d1f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a85d1f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a85d2000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a85d2080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a85d2100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================