loop3: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0x232/0x250 fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff8880291beac0 by task syz-executor.3/9335 CPU: 1 PID: 9335 Comm: syz-executor.3 Not tainted 6.6.0-syzkaller-15029-gbe3ca57cfb77 #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+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 hfsplus_bnode_read+0x232/0x250 fs/hfsplus/bnode.c:32 hfsplus_bnode_read_u16 fs/hfsplus/bnode.c:45 [inline] hfsplus_bnode_dump+0x2a2/0x3d0 fs/hfsplus/bnode.c:321 hfsplus_brec_remove+0x3de/0x4f0 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x29e/0x3b0 fs/hfsplus/attributes.c:299 hfsplus_delete_all_attrs+0x26d/0x330 fs/hfsplus/attributes.c:378 hfsplus_delete_cat+0x83b/0xdd0 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x213/0x7f0 fs/hfsplus/dir.c:385 vfs_unlink+0x2f1/0x900 fs/namei.c:4318 do_unlinkat+0x5bc/0x740 fs/namei.c:4382 __do_sys_unlinkat fs/namei.c:4425 [inline] __se_sys_unlinkat fs/namei.c:4418 [inline] __x64_sys_unlinkat+0xc1/0x130 fs/namei.c:4418 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+0x63/0x6b RIP: 0033:0x7f044467cae9 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:00007f04453db0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 00007f044479bf80 RCX: 00007f044467cae9 RDX: 0000000000000000 RSI: 0000000020000a00 RDI: 0000000000000004 RBP: 00007f04446c847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f044479bf80 R15: 00007ffd3ee71cc8 Allocated by task 9335: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc+0x60/0x100 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:721 [inline] __hfs_bnode_create+0x108/0x860 fs/hfsplus/bnode.c:409 hfsplus_bnode_find+0x2c4/0xcb0 fs/hfsplus/bnode.c:486 hfsplus_brec_find+0x2b9/0x520 fs/hfsplus/bfind.c:183 hfsplus_find_attr fs/hfsplus/attributes.c:160 [inline] hfsplus_delete_all_attrs+0x246/0x330 fs/hfsplus/attributes.c:371 hfsplus_delete_cat+0x83b/0xdd0 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x213/0x7f0 fs/hfsplus/dir.c:385 vfs_unlink+0x2f1/0x900 fs/namei.c:4318 do_unlinkat+0x5bc/0x740 fs/namei.c:4382 __do_sys_unlinkat fs/namei.c:4425 [inline] __se_sys_unlinkat fs/namei.c:4418 [inline] __x64_sys_unlinkat+0xc1/0x130 fs/namei.c:4418 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+0x63/0x6b 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+0x9a/0x790 kernel/rcu/tree.c:2667 shrinker_free+0xfe/0x450 mm/shrinker.c:807 xfs_free_buftarg+0x40/0x1d0 fs/xfs/xfs_buf.c:1946 xfs_mount_free+0xf7/0x1d0 fs/xfs/xfs_super.c:770 deactivate_locked_super+0xbc/0x1a0 fs/super.c:484 deactivate_super+0xde/0x100 fs/super.c:517 cleanup_mnt+0x222/0x450 fs/namespace.c:1256 task_work_run+0x14d/0x240 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x215/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296 do_syscall_64+0x4b/0x110 arch/x86/entry/common.c:88 entry_SYSCALL_64_after_hwframe+0x63/0x6b Second to 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+0x9a/0x790 kernel/rcu/tree.c:2667 shrinker_free+0xfe/0x450 mm/shrinker.c:807 xfs_free_buftarg+0x40/0x1d0 fs/xfs/xfs_buf.c:1946 xfs_mount_free+0xf7/0x1d0 fs/xfs/xfs_super.c:770 deactivate_locked_super+0xbc/0x1a0 fs/super.c:484 deactivate_super+0xde/0x100 fs/super.c:517 cleanup_mnt+0x222/0x450 fs/namespace.c:1256 task_work_run+0x14d/0x240 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x215/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296 do_syscall_64+0x4b/0x110 arch/x86/entry/common.c:88 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff8880291bea00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 40 bytes to the right of allocated 152-byte region [ffff8880291bea00, ffff8880291bea98) The buggy address belongs to the physical page: page:ffffea0000a46f80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x291be flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888013041a00 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112840(GFP_NOWAIT|__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 25569, tgid 25568 (syz-executor.0), ts 1107374257912, free_ts 1107344706886 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+0xa25/0x36c0 mm/page_alloc.c:3312 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4568 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+0x8c7/0x1580 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] __kmem_cache_alloc_node+0x131/0x310 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc+0x4f/0x100 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] xlog_kvmalloc fs/xfs/xfs_log_priv.h:704 [inline] xlog_cil_alloc_shadow_bufs fs/xfs/xfs_log_cil.c:343 [inline] xlog_cil_commit+0x38c/0x3510 fs/xfs/xfs_log_cil.c:1574 __xfs_trans_commit+0x335/0xe50 fs/xfs/xfs_trans.c:1012 xfs_trans_roll+0x1a1/0x3e0 fs/xfs/xfs_trans.c:1160 xfs_defer_trans_roll+0x1ce/0x5a0 fs/xfs/libxfs/xfs_defer.c:366 xfs_defer_finish_noroll+0x2bd/0x1f90 fs/xfs/libxfs/xfs_defer.c:553 __xfs_trans_commit+0x8f9/0xe50 fs/xfs/xfs_trans.c:972 xfs_iomap_write_unwritten+0x362/0x910 fs/xfs/xfs_iomap.c:637 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:2347 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2487 vfree mm/vmalloc.c:2842 [inline] vfree+0x3fb/0xe40 mm/vmalloc.c:2807 delayed_vfree_work+0x56/0x70 mm/vmalloc.c:2763 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Memory state around the buggy address: ffff8880291be980: 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880291bea00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880291bea80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880291beb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880291beb80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================