RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000200 RBP: 00007f29e5df3120 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 0000000000000006 R14: 00007f29e519bf80 R15: 00007ffe12726cc8 ================================================================== BUG: KASAN: invalid-free in slab_free mm/slub.c:3809 [inline] BUG: KASAN: invalid-free in __kmem_cache_free+0xba/0x330 mm/slub.c:3822 Free of addr ffff88807f555210 by task syz-executor.0/2664 CPU: 0 PID: 2664 Comm: syz-executor.0 Not tainted 6.6.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x3d/0x60 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report_invalid_free+0xab/0xd0 mm/kasan/report.c:550 ____kasan_slab_free+0x1a0/0x1b0 mm/kasan/common.c:216 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xba/0x330 mm/slub.c:3822 ovl_do_copy_up fs/overlayfs/copy_up.c:973 [inline] ovl_copy_up_one+0x11a4/0x2960 fs/overlayfs/copy_up.c:1137 ovl_copy_up_flags+0x114/0x160 fs/overlayfs/copy_up.c:1192 ovl_nlink_start+0x303/0x3e0 fs/overlayfs/util.c:1104 ovl_do_remove+0x122/0xb70 fs/overlayfs/dir.c:893 vfs_unlink+0x294/0x800 fs/namei.c:4332 do_unlinkat+0x30e/0x590 fs/namei.c:4398 __do_sys_unlink fs/namei.c:4446 [inline] __se_sys_unlink fs/namei.c:4444 [inline] __x64_sys_unlink+0xa4/0xf0 fs/namei.c:4444 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f29e507cae9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 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 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f29e5df30c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 00007f29e519bf80 RCX: 00007f29e507cae9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000200 RBP: 00007f29e5df3120 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 0000000000000006 R14: 00007f29e519bf80 R15: 00007ffe12726cc8 Allocated by task 2664: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slub.c:3478 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc_lru+0x21d/0x580 mm/slub.c:3509 __d_alloc+0x2c/0x8f0 fs/dcache.c:1768 d_alloc+0x43/0x200 fs/dcache.c:1848 lookup_one_qstr_excl+0x99/0x140 fs/namei.c:1604 do_unlinkat+0x21c/0x590 fs/namei.c:4384 __do_sys_unlink fs/namei.c:4446 [inline] __se_sys_unlink fs/namei.c:4444 [inline] __x64_sys_unlink+0xa4/0xf0 fs/namei.c:4444 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 __call_rcu_common.constprop.0+0x8e/0x6b0 kernel/rcu/tree.c:2653 __dentry_kill+0x3cd/0x5e0 fs/dcache.c:621 dentry_kill fs/dcache.c:733 [inline] dput+0x386/0x950 fs/dcache.c:913 handle_mounts fs/namei.c:1554 [inline] step_into+0xdf6/0x1dc0 fs/namei.c:1839 link_path_walk.part.0.constprop.0+0x53e/0xae0 fs/namei.c:2328 link_path_walk fs/namei.c:2253 [inline] path_openat+0x1d6/0x27c0 fs/namei.c:3792 do_filp_open+0x1bc/0x400 fs/namei.c:3823 do_sys_openat2+0x12c/0x170 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x134/0x1d0 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88807f5551a0 which belongs to the cache dentry of size 312 The buggy address is located 112 bytes inside of 312-byte region [ffff88807f5551a0, ffff88807f5552d8) The buggy address belongs to the physical page: page:ffffea0001fd5500 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7f554 head:ffffea0001fd5500 order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88801391de01 anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff88814000a780 0000000000000000 dead000000000001 raw: 0000000000000000 0000000080150015 00000001ffffffff ffff88801391de01 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Reclaimable, gfp_mask 0xd20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE), pid 1586, tgid 1586 (udevadm), ts 6788394589, free_ts 5956617690 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x27e/0x2f0 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xe91/0x3080 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x470 mm/page_alloc.c:4426 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x24b/0x360 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x7a9/0x1000 mm/slub.c:3223 __slab_alloc.constprop.0+0x4d/0x90 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc_lru+0x483/0x580 mm/slub.c:3509 __d_alloc+0x2c/0x8f0 fs/dcache.c:1768 d_alloc+0x43/0x200 fs/dcache.c:1848 d_alloc_parallel+0xcb/0xc00 fs/dcache.c:2637 lookup_open.isra.0+0x8c0/0x1240 fs/namei.c:3420 open_last_lookups fs/namei.c:3563 [inline] path_openat+0x868/0x27c0 fs/namei.c:3793 do_filp_open+0x1bc/0x400 fs/namei.c:3823 do_sys_openat2+0x12c/0x170 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x134/0x1d0 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0x80 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x506/0xb90 mm/page_alloc.c:2312 free_unref_page+0x33/0x350 mm/page_alloc.c:2405 free_contig_range+0xa1/0x150 mm/page_alloc.c:6342 destroy_args+0x5c0/0x7a0 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x19e2/0x2ab0 mm/debug_vm_pgtable.c:1408 do_one_initcall+0xcd/0x3c0 init/main.c:1232 do_initcall_level init/main.c:1294 [inline] do_initcalls init/main.c:1310 [inline] do_basic_setup init/main.c:1329 [inline] kernel_init_freeable+0x504/0x840 init/main.c:1547 kernel_init+0x1a/0x1c0 init/main.c:1437 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88807f555100: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff88807f555180: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807f555200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88807f555280: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc ffff88807f555300: fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================