syzbot


INFO: task hung in lock_sock_nested (5)

Status: upstream: reported C repro on 2024/12/26 09:34
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+6ac73b3abf1b598863fa@syzkaller.appspotmail.com
First crash: 342d, last: 1d01h
Cause bisection: introduced by (bisect log) :
commit 47069594e67e882ec5c1d8d374f6aab037511509
Author: Sabrina Dubroca <sd@queasysnail.net>
Date: Thu Dec 12 15:36:05 2024 +0000

  tls: implement rekey for TLS1.3

Crash: INFO: task hung in sk_setsockopt (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [net?] INFO: task hung in lock_sock_nested (5) 0 (1) 2024/12/26 09:34
Similar bugs (16)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in lock_sock_nested (2) net C done 418 1756d 1769d 15/28 fixed on 2020/04/15 17:19
upstream INFO: task hung in lock_sock_nested net C 2593 1773d 2573d 0/28 closed as dup on 2017/12/23 20:15
android-44 INFO: task hung in lock_sock_nested (2) 4 1855d 1951d 0/2 auto-closed as invalid on 2020/03/27 01:37
linux-4.19 INFO: task hung in lock_sock_nested (3) 6 702d 917d 0/1 upstream: reported on 2022/06/23 22:52
upstream INFO: task hung in lock_sock_nested (3) net C done 5 1545d 1546d 15/28 fixed on 2020/11/16 12:12
android-49 INFO: task hung in lock_sock_nested (2) 2 1934d 2053d 0/3 auto-closed as invalid on 2020/01/08 15:18
linux-4.14 INFO: task hung in lock_sock_nested 1 1876d 1876d 0/1 auto-closed as invalid on 2020/03/06 15:38
linux-4.14 INFO: task hung in lock_sock_nested (2) 1 1613d 1613d 0/1 auto-closed as invalid on 2020/11/24 03:07
android-44 INFO: task hung in lock_sock_nested C 82 2493d 2495d 0/2 closed as invalid on 2019/03/08 00:11
upstream INFO: task can't die in __lock_sock bluetooth C done error 1067 415d 1229d 0/28 auto-obsoleted due to no activity on 2024/01/16 13:36
upstream INFO: task hung in lock_sock_nested (4) mptcp C done 6 1439d 1486d 19/28 fixed on 2021/03/10 01:48
android-49 INFO: task hung in lock_sock_nested C 101 2133d 2495d 0/3 closed as invalid on 2019/03/08 00:11
android-414 INFO: task hung in lock_sock_nested 65 1899d 2084d 0/1 auto-closed as invalid on 2020/02/12 04:11
linux-4.19 INFO: task hung in lock_sock_nested (2) 1 1113d 1113d 0/1 auto-closed as invalid on 2022/04/08 17:15
linux-5.15 INFO: task hung in lock_sock_nested 1 135d 135d 0/3 auto-obsoleted due to no activity on 2024/11/21 04:55
linux-4.19 INFO: task hung in lock_sock_nested 1 1693d 1693d 0/1 auto-closed as invalid on 2020/09/05 19:53

Sample crash report:
INFO: task syz-executor309:5851 blocked for more than 143 seconds.
      Not tainted 6.13.0-rc3-syzkaller-00762-g9268abe611b0 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor309 state:D stack:28496 pid:5851  tgid:5846  ppid:5845   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5369 [inline]
 __schedule+0x1850/0x4c30 kernel/sched/core.c:6756
 __schedule_loop kernel/sched/core.c:6833 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6848
 __lock_sock+0x1cd/0x330 net/core/sock.c:3079
 lock_sock_nested+0x9e/0x100 net/core/sock.c:3647
 lock_sock include/net/sock.h:1618 [inline]
 sockopt_lock_sock net/core/sock.c:1133 [inline]
 sk_setsockopt+0xebc/0x3290 net/core/sock.c:1290
 do_sock_setsockopt+0x2fb/0x720 net/socket.c:2320
 __sys_setsockopt net/socket.c:2349 [inline]
 __do_sys_setsockopt net/socket.c:2355 [inline]
 __se_sys_setsockopt net/socket.c:2352 [inline]
 __x64_sys_setsockopt+0x1ee/0x280 net/socket.c:2352
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f75d98ee4a9
RSP: 002b:00007f75d9888218 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007f75d9978318 RCX: 00007f75d98ee4a9
RDX: 0000000000000007 RSI: 0000000000000001 RDI: 0000000000000003
RBP: 00007f75d9978310 R08: 0000000000000004 R09: 0000000000000000
R10: 0000000020000040 R11: 0000000000000246 R12: 00007f75d997831c
R13: 00007f75d9945074 R14: 506710fe2170a2df R15: bad24a4ac38a3241
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/30:
 #0: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
 #0: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #0: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6744
2 locks held by getty/5592:
 #0: ffff888031a650a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc900032fb2f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x6a6/0x1e00 drivers/tty/n_tty.c:2211
1 lock held by syz-executor309/5847:
1 lock held by syz-executor309/5851:
 #0: ffff888025a18fd8 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1618 [inline]
 #0: ffff888025a18fd8 (sk_lock-AF_INET6){+.+.}-{0:0}, at: sockopt_lock_sock net/core/sock.c:1133 [inline]
 #0: ffff888025a18fd8 (sk_lock-AF_INET6){+.+.}-{0:0}, at: sk_setsockopt+0xebc/0x3290 net/core/sock.c:1290

=============================================

NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 30 Comm: khungtaskd Not tainted 6.13.0-rc3-syzkaller-00762-g9268abe611b0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 nmi_cpu_backtrace+0x49c/0x4d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x198/0x320 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:162 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:234 [inline]
 watchdog+0xff6/0x1040 kernel/hung_task.c:397
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 5847 Comm: syz-executor309 Not tainted 6.13.0-rc3-syzkaller-00762-g9268abe611b0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:check_kcov_mode kernel/kcov.c:185 [inline]
RIP: 0010:write_comp_data kernel/kcov.c:246 [inline]
RIP: 0010:__sanitizer_cov_trace_const_cmp1+0x2f/0x90 kernel/kcov.c:300
Code: 8b 04 24 65 48 8b 14 25 00 d6 03 00 65 8b 05 00 5f 64 7e 25 00 01 ff 00 74 10 3d 00 01 00 00 75 5b 83 ba 1c 16 00 00 00 74 52 <8b> 82 f8 15 00 00 83 f8 03 75 47 48 8b 8a 00 16 00 00 44 8b 8a fc
RSP: 0018:ffffc9000404fb50 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88807eeb3c00
RDX: ffff88807eeb3c00 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000404fd70 R08: ffffffff8a5765c4 R09: ffffffff898aa128
R10: 000000000000002e R11: ffffffff8a576560 R12: dffffc0000000000
R13: ffff888025a18d80 R14: ffff888025a18d80 R15: ffff888027ebac00
FS:  00007f75d98a96c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055831e406600 CR3: 0000000031a76000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 tls_write_space+0x64/0x120 net/tls/tls_main.c:305
 sk_setsockopt+0x2142/0x3290 net/core/sock.c:1328
 do_sock_setsockopt+0x2fb/0x720 net/socket.c:2320
 __sys_setsockopt net/socket.c:2349 [inline]
 __do_sys_setsockopt net/socket.c:2355 [inline]
 __se_sys_setsockopt net/socket.c:2352 [inline]
 __x64_sys_setsockopt+0x1ee/0x280 net/socket.c:2352
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f75d98ee4a9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f75d98a9218 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007f75d9978308 RCX: 00007f75d98ee4a9
RDX: 0000000000000007 RSI: 0000000000000001 RDI: 0000000000000003
RBP: 00007f75d9978300 R08: 0000000000000004 R09: 0000000000000000
R10: 0000000020000040 R11: 0000000000000246 R12: 00007f75d997830c
R13: 00007f75d9945074 R14: 506710fe2170a2df R15: bad24a4ac38a3241
 </TASK>

Crashes (26):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/25 09:28 net-next 9268abe611b0 444551c4 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce INFO: task hung in lock_sock_nested
2024/10/09 20:42 upstream 75b607fab38d 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce INFO: task hung in lock_sock_nested
2024/10/08 09:51 upstream 87d6aab2389e 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in lock_sock_nested
2024/09/24 14:44 upstream abf2050f51fd 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in lock_sock_nested
2024/09/20 07:39 upstream 2004cef11ea0 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in lock_sock_nested
2024/09/20 05:45 upstream 2004cef11ea0 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in lock_sock_nested
2024/08/18 02:02 upstream df6cbc62cc9b dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce INFO: task hung in lock_sock_nested
2024/06/21 07:22 upstream 50736169ecc8 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce INFO: task hung in lock_sock_nested
2024/04/24 00:52 upstream 71b1543c83d6 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in lock_sock_nested
2024/02/23 10:17 upstream 1c892cdd8fe0 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in lock_sock_nested
2024/02/02 17:10 upstream 021533194476 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce INFO: task hung in lock_sock_nested
2024/01/30 06:16 upstream 861c0981648f 991a98f4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in lock_sock_nested
2024/01/19 01:03 upstream 296455ade1fd 239abf84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in lock_sock_nested
2024/05/10 00:28 upstream 45db3ab70092 de979bc2 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm64-compat INFO: task hung in lock_sock_nested
2024/08/19 01:20 net 2d7423040b7c dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce INFO: task hung in lock_sock_nested
2024/08/19 01:20 net 2d7423040b7c dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce INFO: task hung in lock_sock_nested
2024/04/21 11:08 net f99c5f563c17 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce INFO: task hung in lock_sock_nested
2024/12/25 06:48 net-next 9268abe611b0 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce INFO: task hung in lock_sock_nested
2024/12/20 21:33 net-next b73e56f16250 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce INFO: task hung in lock_sock_nested
2024/11/13 12:27 net-next a58f00ed24b8 62026c85 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce INFO: task hung in lock_sock_nested
2024/08/31 20:03 net-next 43d0035b2c6a 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce INFO: task hung in lock_sock_nested
2024/08/31 20:00 net-next 43d0035b2c6a 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce INFO: task hung in lock_sock_nested
2024/08/30 19:33 net-next fbdaffe41adc f885a8ff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce INFO: task hung in lock_sock_nested
2024/08/30 08:08 net-next 670726a8262e 54fe8471 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce INFO: task hung in lock_sock_nested
2024/12/25 21:39 linux-next 8155b4ef3466 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in lock_sock_nested
2024/01/20 03:48 linux-next ad5c60d66016 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in lock_sock_nested
* Struck through repros no longer work on HEAD.