loop5: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-use-after-free in hfsplus_read_wrapper+0xf62/0x1020 fs/hfsplus/wrapper.c:225 Read of size 2 at addr ffff8880220e3c00 by task syz-executor134/5019 CPU: 1 PID: 5019 Comm: syz-executor134 Not tainted 6.4.0-rc6-syzkaller-00006-gfd37b884003c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 hfsplus_read_wrapper+0xf62/0x1020 fs/hfsplus/wrapper.c:225 hfsplus_fill_super+0x312/0x1c40 fs/hfsplus/super.c:413 mount_bdev+0x358/0x420 fs/super.c:1380 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3039 [inline] path_mount+0x134b/0x1e40 fs/namespace.c:3369 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f19795c8f1a Code: 48 c7 c2 c0 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 a8 00 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffcee9fec18 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f19795c8f1a RDX: 0000000020000000 RSI: 0000000020000640 RDI: 00007ffcee9fec30 RBP: 00007ffcee9fec30 R08: 00007ffcee9fec70 R09: 00000000000005cd R10: 0000000000000000 R11: 0000000000000286 R12: 0000000000000004 R13: 0000555555af32c0 R14: 0000000000000000 R15: 00007ffcee9fec70 The buggy address belongs to the object at ffff8880220e3c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of freed 512-byte region [ffff8880220e3c00, ffff8880220e3e00) The buggy address belongs to the physical page: page:ffffea00008838c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880220e3c00 pfn:0x220e3 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0x3() raw: 00fff00000000200 ffff888012440600 ffffea0000ae0290 ffffea00009003d0 raw: ffff8880220e3c00 ffff8880220e3000 0000000100000003 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 0x242000(__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 1, tgid 1 (swapper/0), ts 9985636434, free_ts 8883827541 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3502 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4768 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1360 [inline] cache_grow_begin+0x9b/0x3b0 mm/slab.c:2569 cache_alloc_refill+0x27f/0x380 mm/slab.c:2942 ____cache_alloc mm/slab.c:3018 [inline] ____cache_alloc mm/slab.c:3001 [inline] __do_cache_alloc mm/slab.c:3201 [inline] slab_alloc_node mm/slab.c:3249 [inline] __kmem_cache_alloc_node+0x360/0x3f0 mm/slab.c:3540 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1057 kmalloc include/linux/slab.h:559 [inline] usb_cache_string+0x62/0x160 drivers/usb/core/message.c:1027 usb_enumerate_device drivers/usb/core/hub.c:2418 [inline] usb_new_device+0x1d1/0x19d0 drivers/usb/core/hub.c:2545 register_root_hub+0x23d/0x650 drivers/usb/core/hcd.c:1017 usb_add_hcd+0xd4d/0x1a60 drivers/usb/core/hcd.c:2991 vhci_hcd_probe+0x1c1/0x490 drivers/usb/usbip/vhci_hcd.c:1376 platform_probe+0x100/0x200 drivers/base/platform.c:1404 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x240/0xca0 drivers/base/dd.c:658 __driver_probe_device+0x1df/0x4b0 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:830 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2564 free_unref_page+0x33/0x370 mm/page_alloc.c:2659 vfree+0x180/0x7e0 mm/vmalloc.c:2798 delayed_vfree_work+0x57/0x70 mm/vmalloc.c:2719 process_one_work+0x99a/0x15e0 kernel/workqueue.c:2405 worker_thread+0x67d/0x10c0 kernel/workqueue.c:2552 kthread+0x344/0x440 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff8880220e3b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880220e3b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880220e3c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880220e3c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880220e3d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================