loop3: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0x22a/0x250 fs/hfsplus/bnode.c:37 Read of size 8 at addr ffff888022bbf808 by task syz-executor.3/19946 CPU: 0 PID: 19946 Comm: syz-executor.3 Not tainted 6.8.0-rc2-syzkaller-00251-g6897cea71837 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 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:377 [inline] print_report+0xc4/0x620 mm/kasan/report.c:488 kasan_report+0xda/0x110 mm/kasan/report.c:601 hfsplus_bnode_read+0x22a/0x250 fs/hfsplus/bnode.c:37 hfsplus_bnode_read_key+0x14d/0x230 fs/hfsplus/bnode.c:70 hfsplus_brec_insert+0x8b3/0xc50 fs/hfsplus/brec.c:141 hfsplus_create_attr+0x3d0/0x4a0 fs/hfsplus/attributes.c:252 __hfsplus_setxattr+0x519/0x2200 fs/hfsplus/xattr.c:345 hfsplus_setxattr+0x10c/0x160 fs/hfsplus/xattr.c:434 __vfs_setxattr+0x176/0x1e0 fs/xattr.c:201 __vfs_setxattr_noperm+0x127/0x5e0 fs/xattr.c:235 __vfs_setxattr_locked+0x182/0x260 fs/xattr.c:296 vfs_setxattr+0x146/0x350 fs/xattr.c:322 do_setxattr+0x146/0x170 fs/xattr.c:630 setxattr+0x15d/0x180 fs/xattr.c:653 path_setxattr+0x179/0x1e0 fs/xattr.c:672 __do_sys_setxattr fs/xattr.c:688 [inline] __se_sys_setxattr fs/xattr.c:684 [inline] __x64_sys_setxattr+0xc4/0x160 fs/xattr.c:684 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd8/0x270 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7fe4e467dda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe4e546c0c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007fe4e47abf80 RCX: 00007fe4e467dda9 RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000020000240 RBP: 00007fe4e46ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fe4e47abf80 R15: 00007ffe01cfbeb8 Allocated by task 19946: 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:372 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:389 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:3981 [inline] __kmalloc+0x1f9/0x440 mm/slub.c:3994 kmalloc include/linux/slab.h:594 [inline] kzalloc include/linux/slab.h:711 [inline] __hfs_bnode_create+0x108/0x870 fs/hfsplus/bnode.c:409 hfsplus_bnode_find+0x2c8/0xcb0 fs/hfsplus/bnode.c:486 hfsplus_brec_find+0x2b9/0x520 fs/hfsplus/bfind.c:183 hfsplus_find_attr+0xe6/0x190 fs/hfsplus/attributes.c:153 hfsplus_attr_exists+0x14d/0x200 fs/hfsplus/attributes.c:182 __hfsplus_setxattr+0x4c6/0x2200 fs/hfsplus/xattr.c:336 hfsplus_setxattr+0x10c/0x160 fs/hfsplus/xattr.c:434 __vfs_setxattr+0x176/0x1e0 fs/xattr.c:201 __vfs_setxattr_noperm+0x127/0x5e0 fs/xattr.c:235 __vfs_setxattr_locked+0x182/0x260 fs/xattr.c:296 vfs_setxattr+0x146/0x350 fs/xattr.c:322 do_setxattr+0x146/0x170 fs/xattr.c:630 setxattr+0x15d/0x180 fs/xattr.c:653 path_setxattr+0x179/0x1e0 fs/xattr.c:672 __do_sys_setxattr fs/xattr.c:688 [inline] __se_sys_setxattr fs/xattr.c:684 [inline] __x64_sys_setxattr+0xc4/0x160 fs/xattr.c:684 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd8/0x270 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 The buggy address belongs to the object at ffff888022bbf770 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 0 bytes to the right of allocated 152-byte region [ffff888022bbf770, ffff888022bbf808) The buggy address belongs to the physical page: page:ffffea00008aefc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x22bbf flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888014c41a00 dead000000000100 dead000000000122 raw: 0000000000000000 00000000800f000f 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 16027098409, free_ts 16019836851 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2190 [inline] allocate_slab mm/slub.c:2354 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2407 ___slab_alloc+0x4af/0x19a0 mm/slub.c:3540 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3625 __slab_alloc_node mm/slub.c:3678 [inline] slab_alloc_node mm/slub.c:3850 [inline] kmalloc_trace+0x30b/0x340 mm/slub.c:4007 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:711 [inline] call_usermodehelper_setup+0x9a/0x340 kernel/umh.c:363 kobject_uevent_env+0x1694/0x1820 lib/kobject_uevent.c:614 driver_register+0x2d3/0x4b0 drivers/base/driver.c:254 usb_register_driver+0x21d/0x4d0 drivers/usb/core/driver.c:1068 do_one_initcall+0x11f/0x670 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+0x68d/0xc10 init/main.c:1551 kernel_init+0x1c/0x2a0 init/main.c:1441 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242 page last free pid 9 tgid 9 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2346 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2486 vfree+0x181/0x7a0 mm/vmalloc.c:2842 delayed_vfree_work+0x56/0x70 mm/vmalloc.c:2763 process_one_work+0x88c/0x15e0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b9/0x12a0 kernel/workqueue.c:2787 kthread+0x2c9/0x3b0 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242 Memory state around the buggy address: ffff888022bbf700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc 00 00 ffff888022bbf780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888022bbf800: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888022bbf880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888022bbf900: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== general protection fault, probably for non-canonical address 0x5088000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 PID: 19946 Comm: syz-executor.3 Tainted: G B 6.8.0-rc2-syzkaller-00251-g6897cea71837 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 RIP: 0010:memcpy_orig+0x1e/0x140 arch/x86/lib/memcpy_64.S:65 Code: 90 90 90 90 90 90 90 90 90 90 90 90 66 0f 1f 00 48 89 f8 48 83 fa 20 0f 82 86 00 00 00 40 38 fe 7c 35 48 83 ea 20 48 83 ea 20 <4c> 8b 06 4c 8b 4e 08 4c 8b 56 10 4c 8b 5e 18 48 8d 76 20 4c 89 07 RSP: 0018:ffffc90008ef71e0 EFLAGS: 00010206 RAX: ffff888046bc0fba RBX: 0005088000000000 RCX: ffffc9000e62f000 RDX: 0000000000000fc0 RSI: 0005088000000000 RDI: ffff888046bc0fba RBP: 0000000000004279 R08: 0000000000000007 R09: 0000000000001000 R10: 0000000000001000 R11: 0000000000000001 R12: 0000000000001000 R13: 0000000000001000 R14: ffff888046bc0fba R15: ffff888022bbf808 FS: 00007fe4e546c6c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055f2e3d42028 CR3: 000000003a9f4000 CR4: 0000000000350ef0 Call Trace: memcpy_from_page include/linux/highmem.h:417 [inline] hfsplus_bnode_read+0x179/0x250 fs/hfsplus/bnode.c:37 hfsplus_bnode_read_key+0x14d/0x230 fs/hfsplus/bnode.c:70 hfsplus_brec_insert+0x8b3/0xc50 fs/hfsplus/brec.c:141 hfsplus_create_attr+0x3d0/0x4a0 fs/hfsplus/attributes.c:252 __hfsplus_setxattr+0x519/0x2200 fs/hfsplus/xattr.c:345 hfsplus_setxattr+0x10c/0x160 fs/hfsplus/xattr.c:434 __vfs_setxattr+0x176/0x1e0 fs/xattr.c:201 __vfs_setxattr_noperm+0x127/0x5e0 fs/xattr.c:235 __vfs_setxattr_locked+0x182/0x260 fs/xattr.c:296 vfs_setxattr+0x146/0x350 fs/xattr.c:322 do_setxattr+0x146/0x170 fs/xattr.c:630 setxattr+0x15d/0x180 fs/xattr.c:653 path_setxattr+0x179/0x1e0 fs/xattr.c:672 __do_sys_setxattr fs/xattr.c:688 [inline] __se_sys_setxattr fs/xattr.c:684 [inline] __x64_sys_setxattr+0xc4/0x160 fs/xattr.c:684 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd8/0x270 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7fe4e467dda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe4e546c0c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007fe4e47abf80 RCX: 00007fe4e467dda9 RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000020000240 RBP: 00007fe4e46ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fe4e47abf80 R15: 00007ffe01cfbeb8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:memcpy_orig+0x1e/0x140 arch/x86/lib/memcpy_64.S:65 Code: 90 90 90 90 90 90 90 90 90 90 90 90 66 0f 1f 00 48 89 f8 48 83 fa 20 0f 82 86 00 00 00 40 38 fe 7c 35 48 83 ea 20 48 83 ea 20 <4c> 8b 06 4c 8b 4e 08 4c 8b 56 10 4c 8b 5e 18 48 8d 76 20 4c 89 07 RSP: 0018:ffffc90008ef71e0 EFLAGS: 00010206 RAX: ffff888046bc0fba RBX: 0005088000000000 RCX: ffffc9000e62f000 RDX: 0000000000000fc0 RSI: 0005088000000000 RDI: ffff888046bc0fba RBP: 0000000000004279 R08: 0000000000000007 R09: 0000000000001000 R10: 0000000000001000 R11: 0000000000000001 R12: 0000000000001000 R13: 0000000000001000 R14: ffff888046bc0fba R15: ffff888022bbf808 FS: 00007fe4e546c6c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffdfc2a1e08 CR3: 000000003a9f4000 CR4: 0000000000350ef0 ---------------- Code disassembly (best guess): 0: 90 nop 1: 90 nop 2: 90 nop 3: 90 nop 4: 90 nop 5: 90 nop 6: 90 nop 7: 90 nop 8: 90 nop 9: 90 nop a: 90 nop b: 90 nop c: 66 0f 1f 00 nopw (%rax) 10: 48 89 f8 mov %rdi,%rax 13: 48 83 fa 20 cmp $0x20,%rdx 17: 0f 82 86 00 00 00 jb 0xa3 1d: 40 38 fe cmp %dil,%sil 20: 7c 35 jl 0x57 22: 48 83 ea 20 sub $0x20,%rdx 26: 48 83 ea 20 sub $0x20,%rdx * 2a: 4c 8b 06 mov (%rsi),%r8 <-- trapping instruction 2d: 4c 8b 4e 08 mov 0x8(%rsi),%r9 31: 4c 8b 56 10 mov 0x10(%rsi),%r10 35: 4c 8b 5e 18 mov 0x18(%rsi),%r11 39: 48 8d 76 20 lea 0x20(%rsi),%rsi 3d: 4c 89 07 mov %r8,(%rdi)