================================================================== BUG: KASAN: slab-use-after-free in hfsplus_read_wrapper+0xf82/0x1070 fs/hfsplus/wrapper.c:225 Read of size 2 at addr ffff88801cdfa800 by task syz-executor421/5127 CPU: 1 PID: 5127 Comm: syz-executor421 Not tainted 6.7.0-rc5-syzkaller-00042-g88035e5694a8 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/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:0x7faa0183b61a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc7fdb6958 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007faa0183b61a RDX: 0000000020000100 RSI: 00000000200002c0 RDI: 00007ffc7fdb69a0 RBP: 0000000000000004 R08: 00007ffc7fdb69e0 R09: 0000000000000672 R10: 0000000000814054 R11: 0000000000000286 R12: 00007ffc7fdb69a0 R13: 00007ffc7fdb69e0 R14: 0000000000080000 R15: 0000000000000003 The buggy address belongs to the object at ffff88801cdfa800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of freed 512-byte region [ffff88801cdfa800, ffff88801cdfaa00) The buggy address belongs to the physical page: page:ffffea0000737e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1cdf8 head:ffffea0000737e00 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 dead000000000001 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 6469180379, free_ts 0 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 kmalloc_trace+0x25/0x60 mm/slab_common.c:1098 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] nfcsim_device_new+0x8e/0x620 drivers/nfc/nfcsim.c:376 nfcsim_init+0x59/0x200 drivers/nfc/nfcsim.c:445 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 page_owner free stack trace missing Memory state around the buggy address: ffff88801cdfa700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801cdfa780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801cdfa800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801cdfa880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801cdfa900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== hfsplus: unable to set blocksize to 1024! hfsplus: unable to find HFS+ superblock