================================================================== BUG: KASAN: use-after-free in path_init+0x59/0xf00 fs/namei.c:2207 Read of size 8 at addr ffff8880a0b10900 by task syz-executor.3/8191 CPU: 0 PID: 8191 Comm: syz-executor.3 Not tainted 5.8.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1f0/0x31e lib/dump_stack.c:118 print_address_description+0x66/0x620 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report+0x132/0x1d0 mm/kasan/report.c:530 path_init+0x59/0xf00 fs/namei.c:2207 path_parentat fs/namei.c:2384 [inline] filename_parentat+0x1a6/0xf50 fs/namei.c:2407 do_rmdir+0x472/0x540 fs/namei.c:3732 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45ce69 Code: 2d b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fcb81199c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000054 RAX: ffffffffffffffda RBX: 00000000000260c0 RCX: 000000000045ce69 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200000c0 RBP: 000000000118c090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118c06c R13: 00007ffdb9df694f R14: 00007fcb8119a9c0 R15: 000000000118c06c Allocated by task 8191: kasan_save_stack mm/kasan/common.c:48 [inline] kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc+0x100/0x130 mm/kasan/common.c:461 slab_post_alloc_hook+0x3e/0x290 mm/slab.h:518 slab_alloc mm/slab.c:3312 [inline] kmem_cache_alloc+0x1d2/0x2d0 mm/slab.c:3482 getname_flags+0xb8/0x610 fs/namei.c:138 getname fs/namei.c:209 [inline] __do_sys_rmdir fs/namei.c:3783 [inline] __se_sys_rmdir fs/namei.c:3781 [inline] __x64_sys_rmdir+0x38/0x50 fs/namei.c:3781 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 8191: kasan_save_stack mm/kasan/common.c:48 [inline] kasan_set_track+0x3d/0x70 mm/kasan/common.c:56 kasan_set_free_info+0x17/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0xdd/0x110 mm/kasan/common.c:422 __cache_free mm/slab.c:3418 [inline] kmem_cache_free+0x79/0xf0 mm/slab.c:3693 putname fs/namei.c:259 [inline] do_rmdir+0x40d/0x540 fs/namei.c:3773 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880a0b10900 which belongs to the cache names_cache of size 4096 The buggy address is located 0 bytes inside of 4096-byte region [ffff8880a0b10900, ffff8880a0b11900) The buggy address belongs to the page: page:000000005a6c8529 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xa0b10 head:000000005a6c8529 order:1 compound_mapcount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea00021d3a88 ffffea0002218a88 ffff8880aa643d00 raw: 0000000000000000 ffff8880a0b10900 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a0b10800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a0b10880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a0b10900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a0b10980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a0b10a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================