syzbot


WARNING: bad unlock balance in mptcp_poll

Status: fixed on 2020/06/18 13:57
Subsystems: mptcp
[Documentation on labels]
Reported-by: syzbot+e56606435b7bfeea8cf5@syzkaller.appspotmail.com
Fix commit: e154659ba39a mptcp: fix double-unlock in mptcp_poll
First crash: 1665d, last: 1660d
Cause bisection: introduced by (bisect log) :
commit 59832e246515ab6a4f5aa878073e6f415aa35166
Author: Florian Westphal <fw@strlen.de>
Date: Thu Apr 2 11:44:52 2020 +0000

  mptcp: subflow: check parent mptcp socket on subflow state change

Crash: WARNING: bad unlock balance in mptcp_poll (log)
Repro: C syz .config
  
Duplicate bugs (2)
duplicates (2):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
WARNING: bad unlock balance in mptcp_listen mptcp 2 1661d 1662d 0/28 closed as dup on 2020/04/12 08:32
WARNING: bad unlock balance in mptcp_shutdown mptcp 2 1666d 1662d 0/28 closed as dup on 2020/04/11 22:44
Discussions (2)
Title Replies (including bot) Last reply
[PATCH net] mptcp: fix double-unlock in mptcp_poll 2 (2) 2020/04/13 04:05
WARNING: bad unlock balance in mptcp_poll 0 (1) 2020/04/11 16:51

Sample crash report:
=====================================
WARNING: bad unlock balance detected!
5.6.0-syzkaller #0 Not tainted
-------------------------------------
syz-executor473/7733 is trying to release lock (sk_lock-AF_INET6) at:
[<ffffffff87c51839>] mptcp_poll+0xb9/0x530 net/mptcp/protocol.c:1856
but there are no more locks to release!

other info that might help us debug this:
1 lock held by syz-executor473/7733:
 #0: ffff88808fe2f0a0 (slock-AF_INET6){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:358 [inline]
 #0: ffff88808fe2f0a0 (slock-AF_INET6){+...}-{2:2}, at: release_sock+0x1b/0x1b0 net/core/sock.c:2974

stack backtrace:
CPU: 0 PID: 7733 Comm: syz-executor473 Not tainted 5.6.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x188/0x20d lib/dump_stack.c:118
 __lock_release kernel/locking/lockdep.c:4633 [inline]
 lock_release+0x586/0x800 kernel/locking/lockdep.c:4941
 sock_release_ownership include/net/sock.h:1539 [inline]
 release_sock+0x177/0x1b0 net/core/sock.c:2984
 mptcp_poll+0xb9/0x530 net/mptcp/protocol.c:1856
 sock_poll+0x15c/0x470 net/socket.c:1271
 vfs_poll include/linux/poll.h:90 [inline]
 do_pollfd fs/select.c:859 [inline]
 do_poll fs/select.c:907 [inline]
 do_sys_poll+0x63c/0xdd0 fs/select.c:1001
 __do_sys_ppoll fs/select.c:1101 [inline]
 __se_sys_ppoll fs/select.c:1081 [inline]
 __x64_sys_ppoll+0x210/0x280 fs/select.c:1081
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x441219
Code: e8 fc ab 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 0f 83 9b 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff9deb18e8 EFLAGS: 00000246 ORIG_RAX: 000000000000010f
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441219
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000020000080
RBP: 000000000000f233 R08: 3f00000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402040
R13: 00000000004020d0 R14: 0000000000000000 R15: 0000000000000000

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/04/09 11:00 upstream ae46d2aa6a7f a8c6a3f8 .config console log report syz C ci-upstream-kasan-gce
2020/04/09 11:26 net-old f691a25ce5e5 a8c6a3f8 .config console log report syz C ci-upstream-net-this-kasan-gce
2020/04/09 11:30 net-next-old 63bef48fd6c9 a8c6a3f8 .config console log report syz C ci-upstream-net-kasan-gce
2020/04/11 13:56 upstream 5b8b9d0c6d0e a8c6a3f8 .config console log report ci-upstream-kasan-gce
2020/04/11 08:07 upstream ab6f762f0f53 a8c6a3f8 .config console log report ci-upstream-kasan-gce-root
2020/04/10 22:30 upstream c0cc271173b2 a8c6a3f8 .config console log report ci-upstream-kasan-gce
2020/04/09 10:26 upstream ae46d2aa6a7f a8c6a3f8 .config console log report ci-upstream-kasan-gce
2020/04/12 04:00 net-old 3b72f84f8fb6 a8c6a3f8 .config console log report ci-upstream-net-this-kasan-gce
2020/04/11 18:35 net-old 9d8592896fd9 a8c6a3f8 .config console log report ci-upstream-net-this-kasan-gce
2020/04/14 10:45 net-next-old 63bef48fd6c9 3f3c5574 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.