MINIX-fs: deleted inode referenced: 2 ================================================================== BUG: KASAN: use-after-free in path_init+0x14ba/0x17d0 fs/namei.c:2208 Read of size 8 at addr ffff88802b4d4400 by task syz-executor.2/11463 CPU: 1 PID: 11463 Comm: syz-executor.2 Not tainted 5.10.0-rc1-next-20201030-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+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x4c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 path_init+0x14ba/0x17d0 fs/namei.c:2208 path_parentat+0x22/0x1b0 fs/namei.c:2385 filename_parentat+0x188/0x560 fs/namei.c:2408 do_renameat2+0x16e/0xc00 fs/namei.c:4375 __do_sys_renameat fs/namei.c:4501 [inline] __se_sys_renameat fs/namei.c:4498 [inline] __x64_sys_renameat+0xbf/0xf0 fs/namei.c:4498 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45deb9 Code: 0d b4 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 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f2df9baec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000108 RAX: ffffffffffffffda RBX: 0000000000027340 RCX: 000000000045deb9 RDX: 0000000000000004 RSI: 0000000020002f00 RDI: 0000000000000003 RBP: 000000000118bf68 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020002f40 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffc9830b50f R14: 00007f2df9baf9c0 R15: 000000000118bf2c Allocated by task 11463: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 slab_post_alloc_hook mm/slab.h:506 [inline] slab_alloc_node mm/slub.c:2889 [inline] slab_alloc mm/slub.c:2897 [inline] kmem_cache_alloc+0x122/0x460 mm/slub.c:2902 getname_flags.part.0+0x50/0x4f0 fs/namei.c:138 getname_flags+0x9a/0xe0 include/linux/audit.h:319 getname fs/namei.c:209 [inline] __do_sys_renameat fs/namei.c:4501 [inline] __se_sys_renameat fs/namei.c:4498 [inline] __x64_sys_renameat+0xad/0xf0 fs/namei.c:4498 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 11463: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x102/0x140 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1544 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1577 slab_free mm/slub.c:3140 [inline] kmem_cache_free+0x82/0x350 mm/slub.c:3156 putname+0xe1/0x120 fs/namei.c:259 do_renameat2+0x3e6/0xc00 fs/namei.c:4481 __do_sys_renameat fs/namei.c:4501 [inline] __se_sys_renameat fs/namei.c:4498 [inline] __x64_sys_renameat+0xbf/0xf0 fs/namei.c:4498 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88802b4d4400 which belongs to the cache names_cache of size 4096 The buggy address is located 0 bytes inside of 4096-byte region [ffff88802b4d4400, ffff88802b4d5400) The buggy address belongs to the page: page:00000000eb36dc79 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2b4d0 head:00000000eb36dc79 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff8880101c1280 raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88802b4d4300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802b4d4380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802b4d4400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802b4d4480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802b4d4500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================