loop1: detected capacity change from 0 to 1024 hfsplus: request for non-existent node 256 in B*Tree hfsplus: request for non-existent node 256 in B*Tree ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0x144/0x150 fs/hfsplus/bnode.c:32 Read of size 8 at addr ffff888022e54bc0 by task syz-executor.1/10753 CPU: 1 PID: 10753 Comm: syz-executor.1 Not tainted 6.4.0-rc5-syzkaller-00002-gf8dba31b0a82 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 hfsplus_bnode_read+0x144/0x150 fs/hfsplus/bnode.c:32 hfsplus_bnode_read_u16 fs/hfsplus/bnode.c:45 [inline] hfsplus_bnode_dump+0x2c6/0x3a0 fs/hfsplus/bnode.c:321 hfsplus_brec_remove+0x3db/0x4f0 fs/hfsplus/brec.c:229 __hfsplus_delete_attr+0x28a/0x3a0 fs/hfsplus/attributes.c:299 hfsplus_delete_all_attrs+0x25d/0x320 fs/hfsplus/attributes.c:378 hfsplus_delete_cat+0x86a/0xe40 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x1e3/0x830 fs/hfsplus/dir.c:385 vfs_unlink+0x355/0x930 fs/namei.c:4327 do_unlinkat+0x3e3/0x680 fs/namei.c:4393 __do_sys_unlink fs/namei.c:4441 [inline] __se_sys_unlink fs/namei.c:4439 [inline] __x64_sys_unlink+0xca/0x110 fs/namei.c:4439 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f0b22e8c169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007f0b219fe168 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 00007f0b22fabf80 RCX: 00007f0b22e8c169 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007f0b22ee7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd367667df R14: 00007f0b219fe300 R15: 0000000000022000 Allocated by task 10753: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] ____kasan_kmalloc mm/kasan/common.c:333 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc+0x5e/0x190 mm/slab_common.c:979 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:680 [inline] __hfs_bnode_create+0x107/0x840 fs/hfsplus/bnode.c:409 hfsplus_bnode_find+0x41c/0xc60 fs/hfsplus/bnode.c:486 hfsplus_brec_find+0x2b3/0x520 fs/hfsplus/bfind.c:183 hfsplus_find_attr fs/hfsplus/attributes.c:160 [inline] hfsplus_delete_all_attrs+0x236/0x320 fs/hfsplus/attributes.c:371 hfsplus_delete_cat+0x86a/0xe40 fs/hfsplus/catalog.c:425 hfsplus_unlink+0x1e3/0x830 fs/hfsplus/dir.c:385 vfs_unlink+0x355/0x930 fs/namei.c:4327 do_unlinkat+0x3e3/0x680 fs/namei.c:4393 __do_sys_unlink fs/namei.c:4441 [inline] __se_sys_unlink fs/namei.c:4439 [inline] __x64_sys_unlink+0xca/0x110 fs/namei.c:4439 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 insert_work+0x48/0x360 kernel/workqueue.c:1365 __queue_work+0x625/0x1120 kernel/workqueue.c:1526 queue_work_on+0xf2/0x110 kernel/workqueue.c:1554 queue_work include/linux/workqueue.h:505 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:659 [inline] netdevice_event+0x5e9/0x8f0 drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain+0xb6/0x3c0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1935 call_netdevice_notifiers_extack net/core/dev.c:1973 [inline] call_netdevice_notifiers net/core/dev.c:1987 [inline] register_netdevice+0xfb4/0x1640 net/core/dev.c:10118 __ip_tunnel_create+0x398/0x5b0 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x1f9/0x5d0 net/ipv4/ip_tunnel.c:1091 ops_init+0xb9/0x6b0 net/core/net_namespace.c:136 setup_net+0x5d1/0xc50 net/core/net_namespace.c:339 copy_net_ns+0x4ee/0x8e0 net/core/net_namespace.c:491 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 copy_namespaces+0x410/0x500 kernel/nsproxy.c:179 copy_process+0x322c/0x75c0 kernel/fork.c:2510 kernel_clone+0xeb/0x890 kernel/fork.c:2915 __do_sys_clone+0xba/0x100 kernel/fork.c:3058 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 kvfree_call_rcu+0x70/0xad0 kernel/rcu/tree.c:3332 fib_rules_unregister+0x35f/0x450 net/core/fib_rules.c:207 ip6mr_net_exit_batch+0x53/0xa0 net/ipv6/ip6mr.c:1362 ops_exit_list+0x125/0x170 net/core/net_namespace.c:175 cleanup_net+0x4ee/0xb10 net/core/net_namespace.c:614 process_one_work+0x99a/0x15e0 kernel/workqueue.c:2405 worker_thread+0x67d/0x10c0 kernel/workqueue.c:2552 kthread+0x344/0x440 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff888022e54b00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 40 bytes to the right of allocated 152-byte region [ffff888022e54b00, ffff888022e54b98) The buggy address belongs to the physical page: page:ffffea00008b9500 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x22e54 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff888012441a00 ffffea0000b13c80 dead000000000006 raw: 0000000000000000 0000000000100010 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 1, tgid 1 (swapper/0), ts 6578309398, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3502 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4768 alloc_page_interleave+0x1e/0x200 mm/mempolicy.c:2112 alloc_pages+0x233/0x270 mm/mempolicy.c:2274 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x390 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3192 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3291 __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] __kmem_cache_alloc_node+0x136/0x320 mm/slub.c:3490 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1057 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:680 [inline] call_usermodehelper_setup+0x9c/0x340 kernel/umh.c:363 kobject_uevent_env+0xedd/0x16c0 lib/kobject_uevent.c:614 device_add+0x10c2/0x1a40 drivers/base/core.c:3606 device_create_groups_vargs+0x203/0x280 drivers/base/core.c:4302 device_create+0xe3/0x120 drivers/base/core.c:4341 mon_bin_add+0xbb/0x160 drivers/usb/mon/mon_bin.c:1363 page_owner free stack trace missing Memory state around the buggy address: ffff888022e54a80: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ffff888022e54b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888022e54b80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888022e54c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888022e54c80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================