syzbot


WARNING: still has locks held in tls_rx_reader_lock

Status: fixed on 2023/02/24 13:50
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+16e72110feb2b653ef27@syzkaller.appspotmail.com
Fix commit: dde06aaa89b7 tls: rx: release the sock lock on locking timeout
First crash: 667d, last: 665d
Cause bisection: introduced by (bisect log) :
commit 4cbc325ed6b4dce4910be06d9d6940a8b919c59b
Author: Jakub Kicinski <kuba@kernel.org>
Date: Fri Jul 15 05:22:25 2022 +0000

  tls: rx: allow only one reader at a time

Crash: INFO: task hung in lock_sock_nested (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH net-next 1/2] tls: rx: release the sock lock on locking timeout 4 (4) 2022/07/22 02:10
[syzbot] WARNING: still has locks held in tls_rx_reader_lock 0 (1) 2022/07/20 17:09
Last patch testing requests (2)
Created Duration User Patch Repo Result
2022/07/21 12:33 18m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git e22c88799f26 OK log
2022/07/21 10:49 10m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git e22c88799f26 report log

Sample crash report:
====================================
WARNING: syz-executor279/3626 still has locks held!
5.19.0-rc6-syzkaller-01454-ge22c88799f26 #0 Not tainted
------------------------------------
1 lock held by syz-executor279/3626:
 #0: ffff888026449ab0 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1659 [inline]
 #0: ffff888026449ab0 (sk_lock-AF_INET6){+.+.}-{0:0}, at: tls_rx_reader_lock+0x2da/0x4e0 net/tls/tls_sw.c:1817

stack backtrace:
CPU: 0 PID: 3626 Comm: syz-executor279 Not tainted 5.19.0-rc6-syzkaller-01454-ge22c88799f26 #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
 try_to_freeze include/linux/freezer.h:66 [inline]
 get_signal+0x1424/0x2600 kernel/signal.c:2647
 arch_do_signal_or_restart+0x82/0x2300 arch/x86/kernel/signal.c:869
 exit_to_user_mode_loop kernel/entry/common.c:166 [inline]
 exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:201
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f66234ef999
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 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:00007f66234802f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: fffffffffffffe00 RBX: 00007f66235773f0 RCX: 00007f66234ef999
RDX: 00000000000000c1 RSI: 0000000020000080 RDI: 0000000000000003
RBP: 00007f6623545064 R08: 00007f6623480700 R09: 0000000000000000
R10: 00007f6623480700 R11: 0000000000000246 R12: 0100000000000000
R13: e8fece2d4e6d48fb R14: 0cb28def7c465af4 R15: 00007f66235773f8
 </TASK>

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/07/19 17:22 net-next-old e22c88799f26 72a3cc0c .config strace log report syz C ci-upstream-net-kasan-gce WARNING: still has locks held in tls_rx_reader_lock
2022/07/22 00:37 net-next-old 5588d6280270 5e6028b9 .config console log report info ci-upstream-net-kasan-gce WARNING: still has locks held in tls_rx_reader_lock
2022/07/20 05:24 net-next-old 7f9eee196ec8 775344bc .config console log report info ci-upstream-net-kasan-gce WARNING: still has locks held in tls_rx_reader_lock
2022/07/19 16:58 net-next-old e22c88799f26 72a3cc0c .config console log report info ci-upstream-net-kasan-gce WARNING: still has locks held in tls_rx_reader_lock
* Struck through repros no longer work on HEAD.