syz-executor299[5027]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set loop0: detected capacity change from 0 to 64 hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_from_page include/linux/highmem.h:417 [inline] BUG: KASAN: slab-out-of-bounds in hfs_bnode_read fs/hfs/bnode.c:35 [inline] BUG: KASAN: slab-out-of-bounds in hfs_bnode_read_key+0x314/0x440 fs/hfs/bnode.c:70 Write of size 256 at addr ffff88801f1da780 by task syz-executor299/5027 CPU: 0 PID: 5027 Comm: syz-executor299 Not tainted 6.6.0-rc7-syzkaller-00018-gd88520ad73b7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x175/0x1b0 mm/kasan/report.c:588 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 memcpy_from_page include/linux/highmem.h:417 [inline] hfs_bnode_read fs/hfs/bnode.c:35 [inline] hfs_bnode_read_key+0x314/0x440 fs/hfs/bnode.c:70 hfs_brec_insert+0x6a1/0xbd0 fs/hfs/brec.c:141 hfs_cat_create+0x5c0/0x970 fs/hfs/catalog.c:131 hfs_create+0x66/0xd0 fs/hfs/dir.c:202 lookup_open fs/namei.c:3496 [inline] open_last_lookups fs/namei.c:3564 [inline] path_openat+0x13e7/0x3180 fs/namei.c:3794 do_filp_open+0x234/0x490 fs/namei.c:3824 do_sys_openat2+0x13e/0x1d0 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x247/0x290 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f77aa5ca979 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007ffdc17aa058 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f77aa61304b RCX: 00007f77aa5ca979 RDX: 0000000000141842 RSI: 0000000020000380 RDI: 00000000ffffff9c RBP: 00007f77aa613055 R08: 0000000000000260 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffdc17aa238 R14: 0000000000000001 R15: 0000000000000001 Allocated by task 5027: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1026 [inline] __kmalloc+0xb9/0x230 mm/slab_common.c:1039 kmalloc include/linux/slab.h:603 [inline] hfs_find_init+0x90/0x1f0 fs/hfs/bfind.c:21 hfs_cat_create+0x17e/0x970 fs/hfs/catalog.c:96 hfs_create+0x66/0xd0 fs/hfs/dir.c:202 lookup_open fs/namei.c:3496 [inline] open_last_lookups fs/namei.c:3564 [inline] path_openat+0x13e7/0x3180 fs/namei.c:3794 do_filp_open+0x234/0x490 fs/namei.c:3824 do_sys_openat2+0x13e/0x1d0 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x247/0x290 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88801f1da780 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 0 bytes inside of allocated 78-byte region [ffff88801f1da780, ffff88801f1da7ce) The buggy address belongs to the physical page: page:ffffea00007c7680 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1f1da flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888012841780 ffffea000050c440 dead000000000008 raw: 0000000000000000 0000000080200020 00000001ffffffff 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 48, tgid 48 (kworker/u4:3), ts 10501611575, free_ts 10495357702 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 alloc_slab_page+0x6a/0x160 mm/slub.c:1870 allocate_slab mm/slub.c:2017 [inline] new_slab+0x84/0x2f0 mm/slub.c:2070 ___slab_alloc+0xc85/0x1310 mm/slub.c:3223 __slab_alloc mm/slub.c:3322 [inline] __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x1af/0x270 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1025 [inline] __kmalloc+0xa8/0x230 mm/slab_common.c:1039 kmalloc include/linux/slab.h:603 [inline] kzalloc include/linux/slab.h:720 [inline] kobject_get_path+0xb8/0x230 lib/kobject.c:159 kobject_uevent_env+0x29f/0x8e0 lib/kobject_uevent.c:529 device_add+0x6b0/0xd30 drivers/base/core.c:3605 sd_probe+0x6ba/0x1130 drivers/scsi/sd.c:3654 really_probe+0x294/0xc30 drivers/base/dd.c:658 __driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:800 driver_probe_device+0x50/0x420 drivers/base/dd.c:830 __device_attach_driver+0x2d3/0x520 drivers/base/dd.c:958 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+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x34c/0x4e0 mm/mmu_gather.c:300 tlb_finish_mmu+0xd4/0x1f0 mm/mmu_gather.c:392 exit_mmap+0x4d3/0xc50 mm/mmap.c:3223 __mmput+0x115/0x3c0 kernel/fork.c:1349 free_bprm+0x144/0x330 fs/exec.c:1492 kernel_execve+0x8f5/0xa10 fs/exec.c:2026 call_usermodehelper_exec_async+0x233/0x370 kernel/umh.c:110 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff88801f1da680: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ffff88801f1da700: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc >ffff88801f1da780: 00 00 00 00 00 00 00 00 00 06 fc fc fc fc fc fc ^ ffff88801f1da800: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ffff88801f1da880: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ==================================================================