syzbot


WARNING: bad unlock balance in rxrpc_do_sendmsg

Status: fixed on 2023/02/24 13:50
Subsystems: afs net
[Documentation on labels]
Reported-by: syzbot+7f0483225d0c94cb3441@syzkaller.appspotmail.com
Fix commit: b0f571ecd794 rxrpc: Fix locking in rxrpc's sendmsg
First crash: 1081d, last: 853d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: WARNING: bad unlock balance in rxrpc_do_sendmsg (log)
Repro: C syz .config
  
Discussions (6)
Title Replies (including bot) Last reply
[PATCH 5.19 000/158] 5.19.6-rc1 review 173 (173) 2022/09/02 18:16
[PATCH 5.15 000/136] 5.15.64-rc1 review 155 (155) 2022/09/01 18:33
[PATCH 5.10 00/86] 5.10.140-rc1 review 96 (96) 2022/08/30 11:56
[PATCH net] rxrpc: Fix locking in rxrpc's sendmsg 2 (2) 2022/08/25 20:00
[syzbot] WARNING: bad unlock balance in rxrpc_do_sendmsg 4 (7) 2022/08/24 16:30
[PATCH] rxrpc: fix bad unlock balance in rxrpc_do_sendmsg 14 (14) 2022/08/22 16:00
Last patch testing requests (5)
Created Duration User Patch Repo Result
2022/08/22 15:45 16m dhowells@redhat.com patch git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git master OK log
2022/08/22 13:41 16m yin31149@gmail.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2022/08/22 04:27 16m khalid.masum.92@gmail.com patch https://github.com/torvalds/linux.git 568035b01cfb error
2022/08/21 19:18 14m khalid.masum.92@gmail.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 568035b01cfb error
2022/08/21 09:24 15m yin31149@gmail.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2022/08/03 09:56 21m bisect fix upstream OK (0) job log log
2022/06/15 13:14 20m bisect fix upstream OK (0) job log log
2022/05/16 12:55 18m bisect fix upstream OK (0) job log log
2022/03/20 12:49 19m bisect fix upstream OK (0) job log log
2022/02/18 12:28 19m bisect fix upstream OK (0) job log log

Sample crash report:
=====================================
WARNING: bad unlock balance detected!
5.19.0-rc5-syzkaller #0 Not tainted
-------------------------------------
syz-executor280/3608 is trying to release lock (&call->user_mutex) at:
[<ffffffff887ef3ae>] rxrpc_do_sendmsg+0xc0e/0x1350 net/rxrpc/sendmsg.c:754
but there are no more locks to release!

other info that might help us debug this:
no locks held by syz-executor280/3608.

stack backtrace:
CPU: 0 PID: 3608 Comm: syz-executor280 Not tainted 5.19.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 print_unlock_imbalance_bug include/trace/events/lock.h:69 [inline]
 __lock_release kernel/locking/lockdep.c:5332 [inline]
 lock_release.cold+0x49/0x4e kernel/locking/lockdep.c:5685
 __mutex_unlock_slowpath+0x99/0x5e0 kernel/locking/mutex.c:907
 rxrpc_do_sendmsg+0xc0e/0x1350 net/rxrpc/sendmsg.c:754
 rxrpc_sendmsg+0x429/0x640 net/rxrpc/af_rxrpc.c:561
 sock_sendmsg_nosec net/socket.c:714 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:734
 ____sys_sendmsg+0x6eb/0x810 net/socket.c:2488
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2542
 __sys_sendmsg net/socket.c:2571 [inline]
 __do_sys_sendmsg net/socket.c:2580 [inline]
 __se_sys_sendmsg net/socket.c:2578 [inline]
 __x64_sys_sendmsg+0x132/0x220 net/socket.c:2578
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0
RIP: 0033:0x7f6b7a064de9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 14 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f6b7a017318 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f6b7a0ed3e8 RCX: 00007f6b7a064de9

Crashes (14):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/07/04 09:56 upstream 88084a3df167 1434eec0 .config strace log report syz C ci-upstream-kasan-gce-selinux-root WARNING: bad unlock balance in rxrpc_do_sendmsg
2022/04/16 12:55 upstream 59250f8a7f3a 8bcc32a6 .config console log report syz C ci-upstream-kasan-gce-root WARNING: bad unlock balance in rxrpc_do_sendmsg
2021/12/26 18:06 upstream 438645193e59 e4f103c4 .config console log report syz C ci-upstream-kasan-gce WARNING: bad unlock balance in rxrpc_do_sendmsg
2021/12/26 18:51 bpf 819d11507f66 e4f103c4 .config console log report syz C ci-upstream-bpf-kasan-gce WARNING: bad unlock balance in rxrpc_do_sendmsg
2021/12/26 18:28 net-old e6007b85dfa2 e4f103c4 .config console log report syz C ci-upstream-net-this-kasan-gce WARNING: bad unlock balance in rxrpc_do_sendmsg
2021/12/26 18:27 bpf-next 4b443bc1785f e4f103c4 .config console log report syz C ci-upstream-bpf-next-kasan-gce WARNING: bad unlock balance in rxrpc_do_sendmsg
2021/12/26 18:26 net-next-old 7c63f26cb518 e4f103c4 .config console log report syz C ci-upstream-net-kasan-gce WARNING: bad unlock balance in rxrpc_do_sendmsg
2022/04/04 17:56 upstream 312310928417 5915c2cb .config console log report info ci-upstream-kasan-gce WARNING: bad unlock balance in rxrpc_do_sendmsg
2021/12/26 17:46 upstream 438645193e59 e4f103c4 .config console log report info ci-upstream-kasan-gce WARNING: bad unlock balance in rxrpc_do_sendmsg
2022/01/10 22:02 bpf d6d86830705f ddb0ab8c .config console log report info ci-upstream-bpf-kasan-gce WARNING: bad unlock balance in rxrpc_do_sendmsg
2022/01/19 12:22 bpf-next eaa266d83a37 0620189b .config console log report info ci-upstream-bpf-next-kasan-gce WARNING: bad unlock balance in rxrpc_do_sendmsg
2022/01/10 04:44 bpf-next 242db6ce976a 2ca0d385 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING: bad unlock balance in rxrpc_do_sendmsg
2021/12/25 06:37 bpf-next 4b443bc1785f 6caa12e4 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING: bad unlock balance in rxrpc_do_sendmsg
2021/12/18 08:31 bpf-next 4b443bc1785f 44068e19 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING: bad unlock balance in rxrpc_do_sendmsg
* Struck through repros no longer work on HEAD.