loop5: detected capacity change from 0 to 64 ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_from_page include/linux/highmem.h:423 [inline] BUG: KASAN: slab-out-of-bounds in hfs_bnode_read+0xc3/0x230 fs/hfs/bnode.c:35 Write of size 94 at addr ffff8880318beb80 by task syz.5.185/6627 CPU: 1 UID: 0 PID: 6627 Comm: syz.5.185 Not tainted 6.15.0-rc1-syzkaller-00308-gecd5d67ad602 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 __asan_memcpy+0x3c/0x60 mm/kasan/shadow.c:106 memcpy_from_page include/linux/highmem.h:423 [inline] hfs_bnode_read+0xc3/0x230 fs/hfs/bnode.c:35 hfs_bnode_read_key+0x14d/0x1e0 fs/hfs/bnode.c:70 hfs_brec_insert+0x66a/0xb90 fs/hfs/brec.c:159 hfs_cat_create+0x357/0x820 fs/hfs/catalog.c:118 hfs_create+0x6b/0xf0 fs/hfs/dir.c:202 lookup_open.isra.0+0x11d3/0x1580 fs/namei.c:3666 open_last_lookups fs/namei.c:3765 [inline] path_openat+0x905/0x2d40 fs/namei.c:4001 do_filp_open+0x20b/0x470 fs/namei.c:4031 do_sys_openat2+0x11b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f2f1958d169 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2f1a3a3038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f2f197a5fa0 RCX: 00007f2f1958d169 RDX: 000000000000275a RSI: 00002000000000c0 RDI: ffffffffffffff9c RBP: 00007f2f1960e990 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f2f197a5fa0 R15: 00007ffc39a52af8 Allocated by task 6627: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4331 [inline] __kmalloc_noprof+0x223/0x510 mm/slub.c:4343 kmalloc_noprof include/linux/slab.h:909 [inline] hfs_find_init+0x95/0x220 fs/hfs/bfind.c:21 hfs_cat_create+0x17a/0x820 fs/hfs/catalog.c:96 hfs_create+0x6b/0xf0 fs/hfs/dir.c:202 lookup_open.isra.0+0x11d3/0x1580 fs/namei.c:3666 open_last_lookups fs/namei.c:3765 [inline] path_openat+0x905/0x2d40 fs/namei.c:4001 do_filp_open+0x20b/0x470 fs/namei.c:4031 do_sys_openat2+0x11b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880318beb80 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 0 bytes inside of allocated 78-byte region [ffff8880318beb80, ffff8880318bebce) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x318be anon flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b441280 0000000000000000 dead000000000001 raw: 0000000000000000 0000000080200020 00000000f5000000 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1089, tgid 1089 (kworker/u8:6), ts 117096504459, free_ts 117062104313 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1717 prep_new_page mm/page_alloc.c:1725 [inline] get_page_from_freelist+0x1193/0x39b0 mm/page_alloc.c:3652 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4934 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2459 [inline] allocate_slab mm/slub.c:2623 [inline] new_slab+0x23c/0x330 mm/slub.c:2676 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3862 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3952 __slab_alloc_node mm/slub.c:4027 [inline] slab_alloc_node mm/slub.c:4188 [inline] __do_kmalloc_node mm/slub.c:4330 [inline] __kmalloc_noprof+0x2f2/0x510 mm/slub.c:4343 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] batadv_tvlv_container_register+0x56/0x430 net/batman-adv/tvlv.c:240 batadv_tt_tvlv_container_update+0x661/0x8d0 net/batman-adv/translation-table.c:1018 batadv_tt_local_commit_changes_nolock+0x8e6/0xec0 net/batman-adv/translation-table.c:3656 batadv_tt_local_commit_changes+0x25/0x30 net/batman-adv/translation-table.c:3667 batadv_iv_ogm_schedule_buff+0x120a/0x14e0 net/batman-adv/bat_iv_ogm.c:819 batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:876 [inline] batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:869 [inline] batadv_iv_send_outstanding_bat_ogm_packet+0x329/0x920 net/batman-adv/bat_iv_ogm.c:1720 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 page last free pid 9 tgid 9 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2680 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4151 [inline] slab_alloc_node mm/slub.c:4200 [inline] __do_kmalloc_node mm/slub.c:4330 [inline] __kmalloc_node_track_caller_noprof+0x1d3/0x510 mm/slub.c:4350 kmalloc_reserve+0xef/0x2c0 net/core/skbuff.c:599 __alloc_skb+0x166/0x380 net/core/skbuff.c:668 alloc_skb include/linux/skbuff.h:1340 [inline] mld_newpack.isra.0+0x18e/0xa20 net/ipv6/mcast.c:1788 add_grhead+0x299/0x340 net/ipv6/mcast.c:1899 add_grec+0x112a/0x1680 net/ipv6/mcast.c:2037 mld_send_cr net/ipv6/mcast.c:2163 [inline] mld_ifc_work+0x41f/0xca0 net/ipv6/mcast.c:2702 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c5/0x780 kernel/kthread.c:464 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff8880318bea80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8880318beb00: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8880318beb80: 00 00 00 00 00 00 00 00 00 06 fc fc fc fc fc fc ^ ffff8880318bec00: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8880318bec80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================