syzbot


WARNING: bad unlock balance in copy_process

Status: upstream: reported on 2025/05/31 10:34
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+80cb3cc5c14fad191a10@syzkaller.appspotmail.com
First crash: 94d, last: 1d03h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [kernel?] WARNING: bad unlock balance in copy_process 0 (1) 2025/05/31 10:34

Sample crash report:
=====================================
WARNING: bad unlock balance detected!
syzkaller #0 Not tainted
-------------------------------------
syz.2.4778/23252 is trying to release lock (&sighand->siglock) at:
[<ffffffff8179fdb2>] spin_unlock include/linux/spinlock.h:391 [inline]
[<ffffffff8179fdb2>] copy_process+0x6b72/0x7690 kernel/fork.c:2432
but there are no more locks to release!

other info that might help us debug this:
1 lock held by syz.2.4778/23252:
 #0: ffffffff8e61ba10 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: copy_process+0x4ba7/0x7690 kernel/fork.c:2274

stack backtrace:
CPU: 3 UID: 0 PID: 23252 Comm: syz.2.4778 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
 print_unlock_imbalance_bug kernel/locking/lockdep.c:5298 [inline]
 print_unlock_imbalance_bug+0x11b/0x130 kernel/locking/lockdep.c:5272
 __lock_release kernel/locking/lockdep.c:5537 [inline]
 lock_release+0x242/0x2f0 kernel/locking/lockdep.c:5889
 __raw_spin_unlock include/linux/spinlock_api_smp.h:141 [inline]
 _raw_spin_unlock+0x16/0x50 kernel/locking/spinlock.c:186
 spin_unlock include/linux/spinlock.h:391 [inline]
 copy_process+0x6b72/0x7690 kernel/fork.c:2432
 kernel_clone+0xfc/0x930 kernel/fork.c:2605
 __do_sys_clone3+0x212/0x290 kernel/fork.c:2909
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f09f6dc3449
Code: d7 08 00 48 8d 3d fc d7 08 00 e8 12 29 f6 ff 66 90 b8 ea ff ff ff 48 85 ff 74 2c 48 85 d2 74 27 49 89 c8 b8 b3 01 00 00 0f 05 <48> 85 c0 7c 18 74 01 c3 31 ed 48 83 e4 f0 4c 89 c7 ff d2 48 89 c7
RSP: 002b:00007ffd9a5573c8 EFLAGS: 00000206 ORIG_RAX: 00000000000001b3
RAX: ffffffffffffffda RBX: 00007f09f6d45860 RCX: 00007f09f6dc3449
RDX: 00007f09f6d45860 RSI: 0000000000000058 RDI: 00007ffd9a557410
RBP: 00007f09f7c8d6c0 R08: 00007f09f7c8d6c0 R09: 00007ffd9a5574f7
R10: 0000000000000008 R11: 0000000000000206 R12: ffffffffffffffa8
R13: 000000000000000b R14: 00007ffd9a557410 R15: 00007ffd9a5574f8
 </TASK>
------------[ cut here ]------------
pvqspinlock: lock 0xffff8880257fca00 has corrupted value 0x0!
WARNING: CPU: 3 PID: 23252 at kernel/locking/qspinlock_paravirt.h:504 __pv_queued_spin_unlock_slowpath+0x237/0x330 kernel/locking/qspinlock_paravirt.h:504
Modules linked in:
CPU: 3 UID: 0 PID: 23252 Comm: syz.2.4778 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:__pv_queued_spin_unlock_slowpath+0x237/0x330 kernel/locking/qspinlock_paravirt.h:504
Code: 03 0f b6 14 02 4c 89 e8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 67 41 8b 55 00 4c 89 ee 48 c7 c7 c0 82 ad 8b e8 4a ab e3 f5 90 <0f> 0b 90 90 e9 64 ff ff ff 90 0f 0b 48 89 df 4c 89 04 24 e8 11 61
RSP: 0018:ffffc90006b0f9c8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffff8880257fca00 RCX: ffffffff817a3358
RDX: ffff88803b2b4880 RSI: ffffffff817a3365 RDI: 0000000000000001
RBP: ffff8880257fca08 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 6c6e697073717670 R12: ffff8880257fca10
R13: ffff8880257fca00 R14: 00000000003d0f00 R15: ffff8880242aa440
FS:  00005555939fe500(0000) GS:ffff8880d69b9000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f09f6d8ebbf CR3: 00000000628aa000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 __raw_callee_save___pv_queued_spin_unlock_slowpath+0x15/0x30
 .slowpath+0x9/0x18
 pv_queued_spin_unlock arch/x86/include/asm/paravirt.h:562 [inline]
 queued_spin_unlock arch/x86/include/asm/qspinlock.h:57 [inline]
 do_raw_spin_unlock+0x172/0x230 kernel/locking/spinlock_debug.c:142
 __raw_spin_unlock include/linux/spinlock_api_smp.h:142 [inline]
 _raw_spin_unlock+0x1e/0x50 kernel/locking/spinlock.c:186
 spin_unlock include/linux/spinlock.h:391 [inline]
 copy_process+0x6b72/0x7690 kernel/fork.c:2432
 kernel_clone+0xfc/0x930 kernel/fork.c:2605
 __do_sys_clone3+0x212/0x290 kernel/fork.c:2909
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f09f6dc3449
Code: d7 08 00 48 8d 3d fc d7 08 00 e8 12 29 f6 ff 66 90 b8 ea ff ff ff 48 85 ff 74 2c 48 85 d2 74 27 49 89 c8 b8 b3 01 00 00 0f 05 <48> 85 c0 7c 18 74 01 c3 31 ed 48 83 e4 f0 4c 89 c7 ff d2 48 89 c7
RSP: 002b:00007ffd9a5573c8 EFLAGS: 00000206 ORIG_RAX: 00000000000001b3
RAX: ffffffffffffffda RBX: 00007f09f6d45860 RCX: 00007f09f6dc3449
RDX: 00007f09f6d45860 RSI: 0000000000000058 RDI: 00007ffd9a557410
RBP: 00007f09f7c8d6c0 R08: 00007f09f7c8d6c0 R09: 00007ffd9a5574f7
R10: 0000000000000008 R11: 0000000000000206 R12: ffffffffffffffa8
R13: 000000000000000b R14: 00007ffd9a557410 R15: 00007ffd9a5574f8
 </TASK>

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/28 16:15 upstream 07d9df80082b bee60a83 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: bad unlock balance in copy_process
2025/08/27 19:28 upstream 39f90c196721 e12e5ba4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: bad unlock balance in copy_process
2025/08/03 04:12 upstream a6923c06a3b2 7368264b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: bad unlock balance in copy_process
2025/06/16 10:02 upstream e04c78d86a96 5f4b362d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: bad unlock balance in copy_process
2025/06/06 11:39 upstream e271ed52b344 3d899f2c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: bad unlock balance in copy_process
2025/05/27 10:31 upstream 785cdec46e92 874a1386 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: bad unlock balance in copy_process
* Struck through repros no longer work on HEAD.