================================================================== BUG: KASAN: slab-use-after-free in dbAllocBits+0x61d/0x630 fs/jfs/jfs_dmap.c:2255 Read of size 8 at addr ffff88807b3fb038 by task syz-executor.2/25040 CPU: 0 PID: 25040 Comm: syz-executor.2 Not tainted 6.6.0-next-20231103-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc3/0x620 mm/kasan/report.c:475 kasan_report+0xd9/0x110 mm/kasan/report.c:588 dbAllocBits+0x61d/0x630 fs/jfs/jfs_dmap.c:2255 dbAllocDmap+0x5c/0x100 fs/jfs/jfs_dmap.c:2032 dbAllocNear fs/jfs/jfs_dmap.c:1258 [inline] dbAlloc+0x780/0xaa0 fs/jfs/jfs_dmap.c:843 diNewExt+0x736/0x1a70 fs/jfs/jfs_imap.c:2255 diAllocExt fs/jfs/jfs_imap.c:1949 [inline] diAllocAG+0x1707/0x2330 fs/jfs/jfs_imap.c:1666 diAlloc+0x8f7/0x1a70 fs/jfs/jfs_imap.c:1587 ialloc+0x84/0x9e0 fs/jfs/jfs_inode.c:56 jfs_mkdir+0x240/0xb30 fs/jfs/namei.c:225 vfs_mkdir+0x574/0x820 fs/namei.c:4106 do_mkdirat+0x2fd/0x3a0 fs/namei.c:4129 __do_sys_mkdir fs/namei.c:4149 [inline] __se_sys_mkdir fs/namei.c:4147 [inline] __x64_sys_mkdir+0xf1/0x140 fs/namei.c:4147 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x62/0x6a RIP: 0033:0x7f0bffc7cae9 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:00007f0c009f20c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007f0bffd9bf80 RCX: 00007f0bffc7cae9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000040 RBP: 00007f0bffcc847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f0bffd9bf80 R15: 00007fffbb9aaca8 Allocated by task 5395: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x24/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:763 [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+0x163/0x390 mm/slub.c:3502 getname_flags.part.0+0x50/0x4e0 fs/namei.c:140 getname_flags+0x9b/0xf0 include/linux/audit.h:321 getname fs/namei.c:219 [inline] __do_sys_symlink fs/namei.c:4511 [inline] __se_sys_symlink fs/namei.c:4509 [inline] __x64_sys_symlink+0x5a/0x90 fs/namei.c:4509 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x62/0x6a Freed by task 5395: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x24/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 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+0xfd/0x350 mm/slub.c:3831 putname+0x12e/0x170 fs/namei.c:274 do_symlinkat+0x1a4/0x310 fs/namei.c:4498 __do_sys_symlink fs/namei.c:4511 [inline] __se_sys_symlink fs/namei.c:4509 [inline] __x64_sys_symlink+0x79/0x90 fs/namei.c:4509 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x62/0x6a The buggy address belongs to the object at ffff88807b3fa200 which belongs to the cache names_cache of size 4096 The buggy address is located 3640 bytes inside of freed 4096-byte region [ffff88807b3fa200, ffff88807b3fb200) The buggy address belongs to the physical page: page:ffffea0001ecfe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7b3f8 head:ffffea0001ecfe00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888015252780 ffffea0000ec9c00 dead000000000002 raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5104, tgid 5104 (syz-executor.5), ts 272508151366, free_ts 272357873981 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa16/0x3680 mm/page_alloc.c:3348 __alloc_pages+0x1cf/0x4c0 mm/page_alloc.c:4604 alloc_pages_mpol+0x258/0x5f0 mm/mempolicy.c:2133 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8bf/0x1570 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 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+0x373/0x390 mm/slub.c:3502 getname_flags.part.0+0x50/0x4e0 fs/namei.c:140 getname_flags+0x9b/0xf0 include/linux/audit.h:321 vfs_fstatat+0x9a/0x140 fs/stat.c:294 __do_sys_newfstatat+0x98/0x110 fs/stat.c:459 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x62/0x6a page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x4f8/0xa90 mm/page_alloc.c:2383 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2523 __unfreeze_partials+0x21d/0x240 mm/slub.c:2655 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:763 [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+0x163/0x390 mm/slub.c:3502 getname_flags.part.0+0x50/0x4e0 fs/namei.c:140 getname_flags+0x9b/0xf0 include/linux/audit.h:321 user_path_at_empty+0x2c/0x60 fs/namei.c:2910 user_path_at include/linux/namei.h:57 [inline] do_utimes_path+0xf4/0x1c0 fs/utimes.c:95 do_utimes+0x34/0x100 fs/utimes.c:145 __do_sys_utimensat fs/utimes.c:164 [inline] __se_sys_utimensat fs/utimes.c:148 [inline] __x64_sys_utimensat+0x1c7/0x280 fs/utimes.c:148 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x62/0x6a Memory state around the buggy address: ffff88807b3faf00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807b3faf80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807b3fb000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807b3fb080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807b3fb100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================