BTRFS info (device loop4): last unmount of filesystem 80873dbf-9d86-4b43-9ab2-fa1277c70e1f BUG: spinlock bad magic on CPU#1, syz-executor/6417 ================================================================== BUG: KASAN: slab-out-of-bounds in task_pid_nr include/linux/pid.h:232 [inline] BUG: KASAN: slab-out-of-bounds in spin_dump kernel/locking/spinlock_debug.c:64 [inline] BUG: KASAN: slab-out-of-bounds in spin_bug+0x1dc/0x1e8 kernel/locking/spinlock_debug.c:78 Read of size 4 at addr ffff0000ed2ef598 by task syz-executor/6417 CPU: 1 UID: 0 PID: 6417 Comm: syz-executor Not tainted 6.13.0-rc2-syzkaller-g2e7aff49b5da #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:484 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x198/0x538 mm/kasan/report.c:489 kasan_report+0xd8/0x138 mm/kasan/report.c:602 __asan_report_load4_noabort+0x20/0x2c mm/kasan/report_generic.c:380 task_pid_nr include/linux/pid.h:232 [inline] spin_dump kernel/locking/spinlock_debug.c:64 [inline] spin_bug+0x1dc/0x1e8 kernel/locking/spinlock_debug.c:78 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] do_raw_spin_lock+0x1d8/0x334 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:120 [inline] _raw_spin_lock_irq+0x60/0x70 kernel/locking/spinlock.c:170 put_pwq_unlocked kernel/workqueue.c:1662 [inline] destroy_workqueue+0x8d8/0xdc0 kernel/workqueue.c:5897 btrfs_stop_all_workers+0xd8/0x240 fs/btrfs/disk-io.c:1784 close_ctree+0x5a4/0xb44 fs/btrfs/disk-io.c:4360 btrfs_put_super+0x70/0x80 fs/btrfs/super.c:74 generic_shutdown_super+0x12c/0x2bc fs/super.c:642 kill_anon_super+0x4c/0x7c fs/super.c:1237 btrfs_kill_super+0x40/0x58 fs/btrfs/super.c:2112 deactivate_locked_super+0xc4/0x12c fs/super.c:473 deactivate_super+0xe0/0x100 fs/super.c:506 cleanup_mnt+0x34c/0x3dc fs/namespace.c:1373 __cleanup_mnt+0x20/0x30 fs/namespace.c:1380 task_work_run+0x230/0x2e0 kernel/task_work.c:239 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] do_notify_resume+0x178/0x1f4 arch/arm64/kernel/entry-common.c:151 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xac/0x168 arch/arm64/kernel/entry-common.c:745 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Allocated by task 7207: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:568 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4283 [inline] __kmalloc_noprof+0x32c/0x54c mm/slub.c:4295 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] __alloc_workqueue+0x168/0x19e4 kernel/workqueue.c:5669 alloc_workqueue+0xec/0x1e4 kernel/workqueue.c:5772 btrfs_alloc_workqueue+0x1a8/0x278 fs/btrfs/async-thread.c:112 btrfs_init_workqueues+0x264/0x5cc fs/btrfs/disk-io.c:1994 open_ctree+0xe58/0x21b8 fs/btrfs/disk-io.c:3351 btrfs_fill_super fs/btrfs/super.c:972 [inline] btrfs_get_tree_super fs/btrfs/super.c:1894 [inline] btrfs_get_tree+0xe30/0x1318 fs/btrfs/super.c:2105 vfs_get_tree+0x90/0x28c fs/super.c:1814 fc_mount+0x24/0xac fs/namespace.c:1231 btrfs_get_tree_subvol fs/btrfs/super.c:2068 [inline] btrfs_get_tree+0x4c4/0x1318 fs/btrfs/super.c:2106 vfs_get_tree+0x90/0x28c fs/super.c:1814 do_new_mount+0x278/0x900 fs/namespace.c:3507 path_mount+0x590/0xe04 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount fs/namespace.c:4034 [inline] __arm64_sys_mount+0x4d4/0x5ac fs/namespace.c:4034 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 The buggy address belongs to the object at ffff0000ed2ef000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 904 bytes to the right of allocated 528-byte region [ffff0000ed2ef000, ffff0000ed2ef210) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12d2e8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000040 ffff0000c0001dc0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000 head: 05ffc00000000040 ffff0000c0001dc0 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000 head: 05ffc00000000003 fffffdffc3b4ba01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000ed2ef480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000ed2ef500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000ed2ef580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000ed2ef600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000ed2ef680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== lock: 0xffff0000d3fa6800, .magic: ffff0000, .owner: /0, .owner_cpu: -270979960 CPU: 1 UID: 0 PID: 6417 Comm: syz-executor Tainted: G B 6.13.0-rc2-syzkaller-g2e7aff49b5da #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:484 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 spin_dump kernel/locking/spinlock_debug.c:70 [inline] spin_bug+0x118/0x1e8 kernel/locking/spinlock_debug.c:78 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] do_raw_spin_lock+0x1d8/0x334 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:120 [inline] _raw_spin_lock_irq+0x60/0x70 kernel/locking/spinlock.c:170 put_pwq_unlocked kernel/workqueue.c:1662 [inline] destroy_workqueue+0x8d8/0xdc0 kernel/workqueue.c:5897 btrfs_stop_all_workers+0xd8/0x240 fs/btrfs/disk-io.c:1784 close_ctree+0x5a4/0xb44 fs/btrfs/disk-io.c:4360 btrfs_put_super+0x70/0x80 fs/btrfs/super.c:74 generic_shutdown_super+0x12c/0x2bc fs/super.c:642 kill_anon_super+0x4c/0x7c fs/super.c:1237 btrfs_kill_super+0x40/0x58 fs/btrfs/super.c:2112 deactivate_locked_super+0xc4/0x12c fs/super.c:473 deactivate_super+0xe0/0x100 fs/super.c:506 cleanup_mnt+0x34c/0x3dc fs/namespace.c:1373 __cleanup_mnt+0x20/0x30 fs/namespace.c:1380 task_work_run+0x230/0x2e0 kernel/task_work.c:239 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] do_notify_resume+0x178/0x1f4 arch/arm64/kernel/entry-common.c:151 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xac/0x168 arch/arm64/kernel/entry-common.c:745 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in kernel/locking/qspinlock.c:131:9 index 15837 is out of range for type 'unsigned long[8]' CPU: 1 UID: 0 PID: 6417 Comm: syz-executor Tainted: G B 6.13.0-rc2-syzkaller-g2e7aff49b5da #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:484 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_out_of_bounds+0xf8/0x148 lib/ubsan.c:429 decode_tail kernel/locking/qspinlock.c:131 [inline] queued_spin_lock_slowpath+0x978/0xd04 kernel/locking/qspinlock.c:468 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x2ec/0x334 kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:120 [inline] _raw_spin_lock_irq+0x60/0x70 kernel/locking/spinlock.c:170 put_pwq_unlocked kernel/workqueue.c:1662 [inline] destroy_workqueue+0x8d8/0xdc0 kernel/workqueue.c:5897 btrfs_stop_all_workers+0xd8/0x240 fs/btrfs/disk-io.c:1784 close_ctree+0x5a4/0xb44 fs/btrfs/disk-io.c:4360 btrfs_put_super+0x70/0x80 fs/btrfs/super.c:74 generic_shutdown_super+0x12c/0x2bc fs/super.c:642 kill_anon_super+0x4c/0x7c fs/super.c:1237 btrfs_kill_super+0x40/0x58 fs/btrfs/super.c:2112 deactivate_locked_super+0xc4/0x12c fs/super.c:473 deactivate_super+0xe0/0x100 fs/super.c:506 cleanup_mnt+0x34c/0x3dc fs/namespace.c:1373 __cleanup_mnt+0x20/0x30 fs/namespace.c:1380 task_work_run+0x230/0x2e0 kernel/task_work.c:239 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] do_notify_resume+0x178/0x1f4 arch/arm64/kernel/entry-common.c:151 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xac/0x168 arch/arm64/kernel/entry-common.c:745 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 ---[ end trace ]--- Unable to handle kernel paging request at virtual address ffff80008f8e15a0 KASAN: probably user-memory-access in range [0x000000047c70ad00-0x000000047c70ad07] Mem abort info: ESR = 0x0000000096000047 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x07: level 3 translation fault Data abort info: ISV = 0, ISS = 0x00000047, ISS2 = 0x00000000 CM = 0, WnR = 1, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000001a587b000 [ffff80008f8e15a0] pgd=0000000000000000, p4d=10000001add12003, pud=10000001add13003, pmd=10000001add18003, pte=0000000000000000 Internal error: Oops: 0000000096000047 [#1] PREEMPT SMP Modules linked in: CPU: 1 UID: 0 PID: 6417 Comm: syz-executor Tainted: G B 6.13.0-rc2-syzkaller-g2e7aff49b5da #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : queued_spin_lock_slowpath+0x3d8/0xd04 kernel/locking/qspinlock.c:471 lr : decode_tail kernel/locking/qspinlock.c:131 [inline] lr : queued_spin_lock_slowpath+0x978/0xd04 kernel/locking/qspinlock.c:468 sp : ffff8000a0517700 x29: ffff8000a05177c0 x28: 000000000000f77a x27: dfff800000000000 x26: 1fffe0001a7f4d00 x25: 0000000000080000 x24: ffff0001b3645588 x23: ffff80008f8e15a0 x22: ffff0001b3645580 x21: 1fffe000366c8ab0 x20: 1ffff000140a2ef0 x19: ffff0000d3fa6800 x18: 0000000000000008 x17: 0000000000000000 x16: ffff80008326d65c x15: ffff7000125cfa48 x14: 1ffff000125cfa48 x13: 0000000000000004 x12: ffffffffffffffff x11: ffff7000125cfa48 x10: ffff80008f8e1580 x9 : 0000000000000002 x8 : 0000000000000000 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff8000a0516df8 x4 : ffff80008fa6f860 x3 : ffff8000802f3b48 x2 : 0000000000000001 x1 : 0000000000000004 x0 : ffff0001b3645588 Call trace: queued_spin_lock_slowpath+0x3d8/0xd04 kernel/locking/qspinlock.c:474 (P) decode_tail kernel/locking/qspinlock.c:131 [inline] (L) queued_spin_lock_slowpath+0x978/0xd04 kernel/locking/qspinlock.c:468 (L) queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x2ec/0x334 kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:120 [inline] _raw_spin_lock_irq+0x60/0x70 kernel/locking/spinlock.c:170 put_pwq_unlocked kernel/workqueue.c:1662 [inline] destroy_workqueue+0x8d8/0xdc0 kernel/workqueue.c:5897 btrfs_stop_all_workers+0xd8/0x240 fs/btrfs/disk-io.c:1784 close_ctree+0x5a4/0xb44 fs/btrfs/disk-io.c:4360 btrfs_put_super+0x70/0x80 fs/btrfs/super.c:74 generic_shutdown_super+0x12c/0x2bc fs/super.c:642 kill_anon_super+0x4c/0x7c fs/super.c:1237 btrfs_kill_super+0x40/0x58 fs/btrfs/super.c:2112 deactivate_locked_super+0xc4/0x12c fs/super.c:473 deactivate_super+0xe0/0x100 fs/super.c:506 cleanup_mnt+0x34c/0x3dc fs/namespace.c:1373 __cleanup_mnt+0x20/0x30 fs/namespace.c:1380 task_work_run+0x230/0x2e0 kernel/task_work.c:239 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] do_notify_resume+0x178/0x1f4 arch/arm64/kernel/entry-common.c:151 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xac/0x168 arch/arm64/kernel/entry-common.c:745 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Code: aa1703e0 9721dee8 aa1803e0 52800081 (f90002f6) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: aa1703e0 mov x0, x23 4: 9721dee8 bl 0xfffffffffc877ba4 8: aa1803e0 mov x0, x24 c: 52800081 mov w1, #0x4 // #4 * 10: f90002f6 str x22, [x23] <-- trapping instruction