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 ffff888016ef4000 by task syz-executor.5/5693 CPU: 1 PID: 5693 Comm: syz-executor.5 Not tainted 6.6.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/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:1629 legacy_get_tree+0x109/0x220 fs/fs_context.c:638 vfs_get_tree+0x8c/0x370 fs/super.c:1750 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f2526c7e09a 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:00007f252797aee8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f252797af80 RCX: 00007f2526c7e09a RDX: 0000000020000000 RSI: 0000000020000640 RDI: 00007f252797af40 RBP: 0000000020000000 R08: 00007f252797af80 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000640 R13: 00007f252797af40 R14: 00000000000005d3 R15: 0000000020000680 Allocated by task 33554432: The buggy address belongs to the object at ffff888016ef4000 which belongs to the cache lsm_inode_cache of size 128 The buggy address is located 0 bytes inside of freed 128-byte region [ffff888016ef4000, ffff888016ef4080) The buggy address belongs to the physical page: page:ffffea00005bbd00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x16ef4 flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0x15() raw: 00fff00000000800 ffff888140051a00 ffffea0001b67ad0 ffffea0001e9fb90 raw: 0000000000000000 ffff888016ef4000 0000000100000015 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 0x342040(__GFP_IO|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 5404, tgid 5404 (syz-executor.5), ts 123606025690, free_ts 123605916291 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1356 [inline] cache_grow_begin+0x99/0x3a0 mm/slab.c:2550 cache_alloc_refill+0x294/0x3a0 mm/slab.c:2923 ____cache_alloc mm/slab.c:2999 [inline] ____cache_alloc mm/slab.c:2982 [inline] __do_cache_alloc mm/slab.c:3182 [inline] slab_alloc_node mm/slab.c:3230 [inline] slab_alloc mm/slab.c:3246 [inline] __kmem_cache_alloc_lru mm/slab.c:3423 [inline] kmem_cache_alloc+0x3a1/0x400 mm/slab.c:3432 kmem_cache_zalloc include/linux/slab.h:710 [inline] lsm_inode_alloc security/security.c:633 [inline] security_inode_alloc+0x38/0x180 security/security.c:1494 inode_init_always+0xbef/0xee0 fs/inode.c:230 alloc_inode+0x7a/0x220 fs/inode.c:266 new_inode_pseudo fs/inode.c:1004 [inline] new_inode+0x22/0x260 fs/inode.c:1030 debugfs_get_inode fs/debugfs/inode.c:72 [inline] __debugfs_create_file+0x11e/0x6a0 fs/debugfs/inode.c:429 debugfs_hw_add+0x2ed/0x360 net/mac80211/debugfs.c:702 ieee80211_register_hw+0x24f1/0x4250 net/mac80211/main.c:1396 mac80211_hwsim_new_radio+0x2567/0x4c00 drivers/net/wireless/virtual/mac80211_hwsim.c:5302 hwsim_new_radio_nl+0xaf8/0x1240 drivers/net/wireless/virtual/mac80211_hwsim.c:5983 genl_family_rcv_msg_doit+0x1fc/0x2e0 net/netlink/genetlink.c:971 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 selinux_genfs_get_sid security/selinux/hooks.c:1341 [inline] inode_doinit_with_dentry+0xac0/0x12c0 security/selinux/hooks.c:1539 selinux_d_instantiate+0x26/0x30 security/selinux/hooks.c:6284 security_d_instantiate+0x54/0xe0 security/security.c:3799 d_instantiate fs/dcache.c:2033 [inline] d_instantiate+0x5c/0x90 fs/dcache.c:2029 __debugfs_create_file+0x298/0x6a0 fs/debugfs/inode.c:444 debugfs_hw_add+0x2cf/0x360 net/mac80211/debugfs.c:701 ieee80211_register_hw+0x24f1/0x4250 net/mac80211/main.c:1396 mac80211_hwsim_new_radio+0x2567/0x4c00 drivers/net/wireless/virtual/mac80211_hwsim.c:5302 hwsim_new_radio_nl+0xaf8/0x1240 drivers/net/wireless/virtual/mac80211_hwsim.c:5983 genl_family_rcv_msg_doit+0x1fc/0x2e0 net/netlink/genetlink.c:971 genl_family_rcv_msg net/netlink/genetlink.c:1051 [inline] genl_rcv_msg+0x55c/0x800 net/netlink/genetlink.c:1066 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2545 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1075 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline] netlink_unicast+0x536/0x810 net/netlink/af_netlink.c:1368 Memory state around the buggy address: ffff888016ef3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888016ef3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888016ef4000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888016ef4080: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff888016ef4100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================