BUG: spinlock bad magic in unmap_page_range

14 views
Skip to first unread message

syzbot

unread,
Apr 30, 2021, 5:19:15 PM4/30/21
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e3d35712 Add linux-next specific files for 20210423
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=12a1674dd00000
kernel config: https://syzkaller.appspot.com/x/.config?x=e370221d7500b26a
dashboard link: https://syzkaller.appspot.com/bug?extid=3bd8798c739d239961c9
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org]

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3bd879...@syzkaller.appspotmail.com

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
================================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jun 24, 2021, 9:48:18 PM6/24/21
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages