loop5: 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 ffff888027dc9800 by task syz-executor.5/5731 CPU: 0 PID: 5731 Comm: syz-executor.5 Not tainted 6.6.0-next-20231102-syzkaller-16110-gab57716449b3 #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 hfsplus_read_wrapper+0xf82/0x1070 fs/hfsplus/wrapper.c:225 hfsplus_fill_super+0x352/0x1bc0 fs/hfsplus/super.c:413 mount_bdev+0x1df/0x2d0 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+0x148e/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:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x62/0x6a RIP: 0033:0x7f78ce87df9a 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:00007f78cf5e3ee8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f78cf5e3f80 RCX: 00007f78ce87df9a RDX: 0000000020000000 RSI: 0000000020000640 RDI: 00007f78cf5e3f40 RBP: 0000000020000000 R08: 00007f78cf5e3f80 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000640 R13: 00007f78cf5e3f40 R14: 00000000000005d3 R15: 0000000020000680 The buggy address belongs to the object at ffff888027dc9800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of freed 512-byte region [ffff888027dc9800, ffff888027dc9a00) The buggy address belongs to the physical page: page:ffffea00009f7200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x27dc8 head:ffffea00009f7200 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888013041c80 0000000000000000 0000000000000001 raw: 0000000000000000 0000000080100010 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 5538, tgid 5538 (kworker/1:8), ts 109738443763, free_ts 109571213942 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] __kmem_cache_alloc_node+0x131/0x310 mm/slub.c:3517 kmalloc_trace+0x27/0xf0 mm/slab_common.c:1098 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] mca_alloc net/ipv6/mcast.c:880 [inline] __ipv6_dev_mc_inc+0x2b7/0xc40 net/ipv6/mcast.c:936 addrconf_join_solict net/ipv6/addrconf.c:2200 [inline] addrconf_dad_begin net/ipv6/addrconf.c:4045 [inline] addrconf_dad_work+0x232/0x14b0 net/ipv6/addrconf.c:4170 process_one_work+0x8a2/0x15e0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b6/0x1280 kernel/workqueue.c:2784 kthread+0x337/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 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] kmem_cache_alloc_node+0x180/0x3d0 mm/slub.c:3523 kmalloc_reserve+0x166/0x260 net/core/skbuff.c:560 __alloc_skb+0x12b/0x330 net/core/skbuff.c:651 alloc_skb include/linux/skbuff.h:1286 [inline] nlmsg_new include/net/netlink.h:1010 [inline] rtmsg_fib+0x13f/0x520 net/ipv4/fib_semantics.c:522 fib_table_insert+0xc40/0x1d70 net/ipv4/fib_trie.c:1404 fib_magic+0x4d2/0x5c0 net/ipv4/fib_frontend.c:1104 fib_add_ifaddr+0x174/0x560 net/ipv4/fib_frontend.c:1126 fib_inetaddr_event+0x170/0x2c0 net/ipv4/fib_frontend.c:1440 notifier_call_chain+0xb6/0x3c0 kernel/notifier.c:93 blocking_notifier_call_chain kernel/notifier.c:388 [inline] blocking_notifier_call_chain+0x69/0x90 kernel/notifier.c:376 Memory state around the buggy address: ffff888027dc9700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888027dc9780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888027dc9800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888027dc9880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888027dc9900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================