syzbot


BUG: spinlock bad magic in unmap_page_range

Status: auto-closed as invalid on 2021/06/25 01:48
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+3bd8798c739d239961c9@syzkaller.appspotmail.com
First crash: 1067d, last: 1067d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 BUG: spinlock bad magic in unmap_page_range 1 1051d 1051d 0/1 auto-closed as invalid on 2021/09/08 23:10

Sample crash report:
BUG: spinlock bad magic on CPU#0, agetty/8369
 lock: 0xffff88801dc18000, .magic: 000002d0, .owner: <none>/-1, .owner_cpu: 13902
CPU: 0 PID: 8369 Comm: agetty Not tainted 5.12.0-rc8-next-20210423-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x141/0x1d7 lib/dump_stack.c:120
 debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline]
 do_raw_spin_lock+0x216/0x2b0 kernel/locking/spinlock_debug.c:112
 spin_lock include/linux/spinlock.h:359 [inline]
 zap_pte_range mm/memory.c:1228 [inline]
 zap_pmd_range mm/memory.c:1374 [inline]
 zap_pud_range mm/memory.c:1403 [inline]
 zap_p4d_range mm/memory.c:1424 [inline]
 unmap_page_range+0x7fe/0x2650 mm/memory.c:1445
 unmap_single_vma+0x198/0x300 mm/memory.c:1490
 unmap_vmas+0x16d/0x2f0 mm/memory.c:1522
 exit_mmap+0x2a8/0x590 mm/mmap.c:3207
 __mmput+0x122/0x470 kernel/fork.c:1095
 mmput+0x58/0x60 kernel/fork.c:1116
 exit_mm kernel/exit.c:502 [inline]
 do_exit+0xb0a/0x2a70 kernel/exit.c:813
 do_group_exit+0x125/0x310 kernel/exit.c:923
 get_signal+0x47f/0x2150 kernel/signal.c:2818
 arch_do_signal_or_restart+0x2a8/0x1eb0 arch/x86/kernel/signal.c:789
 handle_signal_work kernel/entry/common.c:147 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
 exit_to_user_mode_prepare+0x171/0x280 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:301
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:57
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f43808a45e3
Code: Unable to access opcode bytes at RIP 0x7f43808a45b9.
RSP: 002b:00007ffca23e8438 EFLAGS: 00000246 ORIG_RAX: 0000000000000017
RAX: 0000000000000001 RBX: 00007ffca23e8470 RCX: 00007f43808a45e3
RDX: 0000000000000000 RSI: 00007ffca23e8530 RDI: 0000000000000005
RBP: 00007ffca23e8460 R08: 0000000000000000 R09: 00007ffca23e84f0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffca23e8454
R13: 00007ffca23e85b0 R14: 00007ffca23e84b0 R15: 0000000000000000
================================================================================
UBSAN: array-index-out-of-bounds in kernel/locking/qspinlock.c:130:9
index 16382 is out of range for type 'long unsigned int [8]'
CPU: 0 PID: 8369 Comm: agetty Not tainted 5.12.0-rc8-next-20210423-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x141/0x1d7 lib/dump_stack.c:120
 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148
 __ubsan_handle_out_of_bounds.cold+0x62/0x6c lib/ubsan.c:288
 decode_tail kernel/locking/qspinlock.c:130 [inline]
 __pv_queued_spin_lock_slowpath+0xa3f/0xb40 kernel/locking/qspinlock.c:468
 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:585 [inline]
 queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline]
 queued_spin_lock include/asm-generic/qspinlock.h:85 [inline]
 do_raw_spin_lock+0x200/0x2b0 kernel/locking/spinlock_debug.c:113
 spin_lock include/linux/spinlock.h:359 [inline]
 zap_pte_range mm/memory.c:1228 [inline]
 zap_pmd_range mm/memory.c:1374 [inline]
 zap_pud_range mm/memory.c:1403 [inline]
 zap_p4d_range mm/memory.c:1424 [inline]
 unmap_page_range+0x7fe/0x2650 mm/memory.c:1445
 unmap_single_vma+0x198/0x300 mm/memory.c:1490
 unmap_vmas+0x16d/0x2f0 mm/memory.c:1522
 exit_mmap+0x2a8/0x590 mm/mmap.c:3207
 __mmput+0x122/0x470 kernel/fork.c:1095
 mmput+0x58/0x60 kernel/fork.c:1116
 exit_mm kernel/exit.c:502 [inline]
 do_exit+0xb0a/0x2a70 kernel/exit.c:813
 do_group_exit+0x125/0x310 kernel/exit.c:923
 get_signal+0x47f/0x2150 kernel/signal.c:2818
 arch_do_signal_or_restart+0x2a8/0x1eb0 arch/x86/kernel/signal.c:789
 handle_signal_work kernel/entry/common.c:147 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
 exit_to_user_mode_prepare+0x171/0x280 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:301
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:57
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f43808a45e3
Code: Unable to access opcode bytes at RIP 0x7f43808a45b9.
RSP: 002b:00007ffca23e8438 EFLAGS: 00000246 ORIG_RAX: 0000000000000017
RAX: 0000000000000001 RBX: 00007ffca23e8470 RCX: 00007f43808a45e3
RDX: 0000000000000000 RSI: 00007ffca23e8530 RDI: 0000000000000005
RBP: 00007ffca23e8460 R08: 0000000000000000 R09: 00007ffca23e84f0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffca23e8454
R13: 00007ffca23e85b0 R14: 00007ffca23e84b0 R15: 0000000000000000
================================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/04/26 01:48 linux-next e3d35712f85a 2a82f1b3 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: spinlock bad magic in unmap_page_range
* Struck through repros no longer work on HEAD.