loop0: detected capacity change from 0 to 64 ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_from_page include/linux/highmem.h:417 [inline] BUG: KASAN: slab-out-of-bounds in hfs_bnode_read+0xbc/0x220 fs/hfs/bnode.c:35 Write of size 94 at addr ffff8880276d8980 by task syz.0.15/6524 CPU: 0 UID: 0 PID: 6524 Comm: syz.0.15 Not tainted 6.13.0-rc1-syzkaller-00316-gb5f217084ab3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xc3/0x620 mm/kasan/report.c:489 kasan_report+0xd9/0x110 mm/kasan/report.c:602 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 __asan_memcpy+0x3c/0x60 mm/kasan/shadow.c:106 memcpy_from_page include/linux/highmem.h:417 [inline] hfs_bnode_read+0xbc/0x220 fs/hfs/bnode.c:35 hfs_bnode_read_key+0x14e/0x1f0 fs/hfs/bnode.c:70 hfs_brec_insert+0x66b/0xb90 fs/hfs/brec.c:159 hfs_cat_move+0x3f0/0x7e0 fs/hfs/catalog.c:336 hfs_rename+0xe8/0x200 fs/hfs/dir.c:299 vfs_rename+0xf8b/0x21f0 fs/namei.c:5067 do_renameat2+0xc5f/0xdd0 fs/namei.c:5224 __do_sys_renameat2 fs/namei.c:5258 [inline] __se_sys_renameat2 fs/namei.c:5255 [inline] __x64_sys_renameat2+0xe7/0x130 fs/namei.c:5255 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbaf477e819 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fbaf556c038 EFLAGS: 00000246 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007fbaf4935fa0 RCX: 00007fbaf477e819 RDX: 0000000000000004 RSI: 0000000020000380 RDI: 0000000000000004 RBP: 00007fbaf47f175e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000200 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fbaf4935fa0 R15: 00007ffd9fab9888 Allocated by task 6524: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4283 [inline] __kmalloc_noprof+0x21c/0x510 mm/slub.c:4295 kmalloc_noprof include/linux/slab.h:905 [inline] hfs_find_init+0x95/0x220 fs/hfs/bfind.c:21 hfs_cat_move+0x15a/0x7e0 fs/hfs/catalog.c:301 hfs_rename+0xe8/0x200 fs/hfs/dir.c:299 vfs_rename+0xf8b/0x21f0 fs/namei.c:5067 do_renameat2+0xc5f/0xdd0 fs/namei.c:5224 __do_sys_renameat2 fs/namei.c:5258 [inline] __se_sys_renameat2 fs/namei.c:5255 [inline] __x64_sys_renameat2+0xe7/0x130 fs/namei.c:5255 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880276d8980 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 0 bytes inside of allocated 78-byte region [ffff8880276d8980, ffff8880276d89ce) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x276d8 anon flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b041280 0000000000000000 dead000000000001 raw: 0000000000000000 0000000080200020 00000001f5000000 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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 21974953829, free_ts 19907419788 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3474 __alloc_pages_noprof+0x223/0x25b0 mm/page_alloc.c:4751 alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265 alloc_slab_page mm/slub.c:2408 [inline] allocate_slab mm/slub.c:2574 [inline] new_slab+0x2c9/0x410 mm/slub.c:2627 ___slab_alloc+0xdac/0x1870 mm/slub.c:3815 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3905 __slab_alloc_node mm/slub.c:3980 [inline] slab_alloc_node mm/slub.c:4141 [inline] __kmalloc_cache_noprof+0xfa/0x410 mm/slub.c:4309 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] usb_hub_create_port_device+0xbb/0xde0 drivers/usb/core/port.c:744 hub_configure drivers/usb/core/hub.c:1710 [inline] hub_probe+0x1e1f/0x3200 drivers/usb/core/hub.c:1965 usb_probe_interface+0x303/0x9c0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x241/0xa90 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:830 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:958 bus_for_each_drv+0x15a/0x1e0 drivers/base/bus.c:459 page last free pid 25 tgid 25 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0x661/0x1080 mm/page_alloc.c:2657 vfree+0x17a/0x890 mm/vmalloc.c:3382 delayed_vfree_work+0x56/0x70 mm/vmalloc.c:3303 process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff8880276d8880: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ffff8880276d8900: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc >ffff8880276d8980: 00 00 00 00 00 00 00 00 00 06 fc fc fc fc fc fc ^ ffff8880276d8a00: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ffff8880276d8a80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================