loop0: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-use-after-free in hfsplus_read_wrapper+0xf82/0x1070 fs/hfsplus/wrapper.c:225 Read of size 2 at addr ffff888063964800 by task syz-executor.0/5775 CPU: 0 PID: 5775 Comm: syz-executor.0 Not tainted 6.7.0-rc7-syzkaller-00003-gfbafc3e621c3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/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_read_wrapper+0xf82/0x1070 fs/hfsplus/wrapper.c:225 hfsplus_fill_super+0x352/0x1bc0 fs/hfsplus/super.c:413 mount_bdev+0x1f3/0x2e0 fs/super.c:1650 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8c/0x370 fs/super.c:1771 do_new_mount fs/namespace.c:3337 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3664 do_mount fs/namespace.c:3677 [inline] __do_sys_mount fs/namespace.c:3886 [inline] __se_sys_mount fs/namespace.c:3863 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3863 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7fa64a27e1ea Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007fa64af1dee8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fa64af1df80 RCX: 00007fa64a27e1ea RDX: 0000000020000600 RSI: 0000000020000640 RDI: 00007fa64af1df40 RBP: 0000000020000600 R08: 00007fa64af1df80 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000640 R13: 00007fa64af1df40 R14: 00000000000005cf R15: 0000000020000240 The buggy address belongs to the object at ffff888063964800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of freed 512-byte region [ffff888063964800, ffff888063964a00) The buggy address belongs to the physical page: page:ffffea00018e5900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x63964 head:ffffea00018e5900 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888013041c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5427, tgid 5427 (syz-executor.1), ts 87350194796, free_ts 13111419108 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312 __alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568 alloc_pages_mpol+0x258/0x5f0 mm/mempolicy.c:2133 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab mm/slub.c:2017 [inline] new_slab+0x283/0x3c0 mm/slub.c:2070 ___slab_alloc+0x979/0x1500 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+0x49/0x90 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:721 [inline] fib6_info_alloc+0x40/0x100 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x337/0x1b70 net/ipv6/route.c:3749 ip6_route_add+0x26/0x150 net/ipv6/route.c:3843 addrconf_prefix_route+0x2fe/0x510 net/ipv6/addrconf.c:2445 add_v4_addrs+0x6c3/0x9e0 net/ipv6/addrconf.c:3218 addrconf_gre_config net/ipv6/addrconf.c:3492 [inline] addrconf_init_auto_addrs+0x18a/0x820 net/ipv6/addrconf.c:3510 addrconf_notify+0xe6a/0x1920 net/ipv6/addrconf.c:3691 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+0x4fa/0xaa0 mm/page_alloc.c:2347 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2487 free_contig_range+0xb6/0x190 mm/page_alloc.c:6536 destroy_args+0xa69/0xe40 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x16fe/0x3250 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x11c/0x650 init/main.c:1236 do_initcall_level init/main.c:1298 [inline] do_initcalls init/main.c:1314 [inline] do_basic_setup init/main.c:1333 [inline] kernel_init_freeable+0x687/0xc10 init/main.c:1551 kernel_init+0x1c/0x2a0 init/main.c:1441 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: ffff888063964700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888063964780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888063964800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888063964880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888063964900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================