syzbot


INFO: task hung in unix_dgram_sendmsg

Status: fixed on 2024/03/25 11:41
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+4fa4a2d1f5a5ee06f006@syzkaller.appspotmail.com
Fix commit: 25236c91b5ab af_unix: Fix task hung while purging oob_skb in GC.
First crash: 105d, last: 85d
Cause bisection: introduced by (bisect log) :
commit 1279f9d9dec2d7462823a18c29ad61359e0a007d
Author: Kuniyuki Iwashima <kuniyu@amazon.com>
Date: Sat Feb 3 18:31:49 2024 +0000

  af_unix: Call kfree_skb() for dead unix_(sk)->oob_skb in GC.

Crash: BUG: soft lockup in unix_release (log)
Repro: C syz .config
  
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
KASAN: slab-use-after-free Read in __unix_gc net C error 15 98d 104d 0/26 closed as dup on 2024/02/10 08:11
Discussions (2)
Title Replies (including bot) Last reply
[PATCH v1 net] af_unix: Fix task hung while purging oob_skb in GC. 2 (2) 2024/02/13 10:40
[syzbot] [net?] INFO: task hung in unix_dgram_sendmsg 2 (4) 2024/02/10 00:17
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: task hung in unix_dgram_sendmsg origin:lts-only C inconclusive 27 79d 97d 0/3 upstream: reported C repro on 2024/02/16 20:24
linux-5.15 INFO: task hung in unix_dgram_sendmsg origin:lts-only C inconclusive 24 79d 86d 0/3 upstream: reported C repro on 2024/02/28 06:17
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/02/09 20:48 1h42m kuniyu@amazon.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1279f9d9dec2d7462823a18c29ad61359e0a007d OK log

Sample crash report:
INFO: task klogd:4499 blocked for more than 143 seconds.
      Not tainted 6.8.0-rc3-syzkaller-00136-g1f719a2f3fa6 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:klogd           state:D stack:26360 pid:4499  tgid:4499  ppid:1      flags:0x00000002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5400 [inline]
 __schedule+0xf12/0x5c60 kernel/sched/core.c:6727
 __schedule_loop kernel/sched/core.c:6802 [inline]
 schedule+0xe9/0x280 kernel/sched/core.c:6817
 wait_for_unix_gc+0x192/0x200 net/unix/garbage.c:201
 unix_dgram_sendmsg+0x10e/0x1d10 net/unix/af_unix.c:1924
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 __sys_sendto+0x47f/0x4e0 net/socket.c:2191
 __do_sys_sendto net/socket.c:2203 [inline]
 __se_sys_sendto net/socket.c:2199 [inline]
 __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2199
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x6f/0x77
RIP: 0033:0x7f52bb0e69b5
RSP: 002b:00007ffc4e4eb038 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f52bb0e69b5
RDX: 0000000000000058 RSI: 000055b5f9c3e420 RDI: 0000000000000003
RBP: 000055b5f9c382c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000004000 R11: 0000000000000246 R12: 0000000000000013
R13: 00007f52bb274212 R14: 00007ffc4e4eb138 R15: 0000000000000000
 </TASK>
INFO: task dhcpcd:4723 blocked for more than 143 seconds.
      Not tainted 6.8.0-rc3-syzkaller-00136-g1f719a2f3fa6 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:dhcpcd          state:D stack:26384 pid:4723  tgid:4723  ppid:1      flags:0x00000002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5400 [inline]
 __schedule+0xf12/0x5c60 kernel/sched/core.c:6727
 __schedule_loop kernel/sched/core.c:6802 [inline]
 schedule+0xe9/0x280 kernel/sched/core.c:6817
 wait_for_unix_gc+0x192/0x200 net/unix/garbage.c:201
 unix_dgram_sendmsg+0x10e/0x1d10 net/unix/af_unix.c:1924
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 sock_write_iter+0x50a/0x5c0 net/socket.c:1160
 call_write_iter include/linux/fs.h:2085 [inline]
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x6de/0x1110 fs/read_write.c:590
 ksys_write+0x1f8/0x260 fs/read_write.c:643
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x6f/0x77
RIP: 0033:0x7f09e4d40bf2
RSP: 002b:00007ffdd90b9f68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000055f6a34d4030 RCX: 00007f09e4d40bf2
RDX: 0000000000000047 RSI: 00007ffdd90b9f80 RDI: 0000000000000005
RBP: 00007ffdd90b9f80 R08: 0000000000000008 R09: 0000000000000036
R10: 0000000000000000 R11: 0000000000000246 R12: 000055f6a22eeefc
R13: 00007ffdd90ba3b0 R14: 000055f6a35abbb0 R15: 0000000000000001
 </TASK>
INFO: task udevd:5066 blocked for more than 143 seconds.
      Not tainted 6.8.0-rc3-syzkaller-00136-g1f719a2f3fa6 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd           state:D stack:26920 pid:5066  tgid:5066  ppid:4510   flags:0x00000006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5400 [inline]
 __schedule+0xf12/0x5c60 kernel/sched/core.c:6727
 __schedule_loop kernel/sched/core.c:6802 [inline]
 schedule+0xe9/0x280 kernel/sched/core.c:6817
 wait_for_unix_gc+0x192/0x200 net/unix/garbage.c:201
 unix_dgram_sendmsg+0x10e/0x1d10 net/unix/af_unix.c:1924
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 sock_write_iter+0x50a/0x5c0 net/socket.c:1160
 call_write_iter include/linux/fs.h:2085 [inline]
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x6de/0x1110 fs/read_write.c:590
 ksys_write+0x1f8/0x260 fs/read_write.c:643
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x6f/0x77
RIP: 0033:0x7f5dea316bf2
RSP: 002b:00007ffe87a832d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5dea316bf2
RDX: 0000000000000000 RSI: 00007ffe87a8332f RDI: 000000000000000a
RBP: 00007ffe87a8332f R08: 0000000000000001 R09: bff9cdc4d7b79566
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000a
R13: 00007f5dea6d7ae0 R14: 0000000000000000 R15: 0000564f4f9ec2c0
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/29:
 #0: ffffffff8d7ad160 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:298 [inline]
 #0: ffffffff8d7ad160 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:750 [inline]
 #0: ffffffff8d7ad160 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x75/0x340 kernel/locking/lockdep.c:6614
2 locks held by getty/4820:
 #0: ffff88802b6b90a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffffc900015d02f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xfca/0x1490 drivers/tty/n_tty.c:2201
1 lock held by syz-executor236/5065:

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

NMI backtrace for cpu 0
CPU: 0 PID: 29 Comm: khungtaskd Not tainted 6.8.0-rc3-syzkaller-00136-g1f719a2f3fa6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x27b/0x390 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x29c/0x300 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:222 [inline]
 watchdog+0xf87/0x1210 kernel/hung_task.c:379
 kthread+0x2c6/0x3b0 kernel/kthread.c:388
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 5065 Comm: syz-executor236 Not tainted 6.8.0-rc3-syzkaller-00136-g1f719a2f3fa6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:26 [inline]
RIP: 0010:check_kcov_mode kernel/kcov.c:173 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0xd/0x60 kernel/kcov.c:207
Code: cc cc cc cc 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 65 48 8b 14 25 40 c2 03 00 <65> 8b 05 b4 7c 78 7e a9 00 01 ff 00 48 8b 34 24 74 0f f6 c4 01 74
RSP: 0018:ffffc900033efa58 EFLAGS: 00000283
RAX: ffff88807b077800 RBX: ffff88807b077800 RCX: 1ffffffff27b1189
RDX: ffff88802a5a3b80 RSI: ffffffff8968488d RDI: ffff88807b077f70
RBP: ffffc900033efbb0 R08: 0000000000000001 R09: fffffbfff27a900c
R10: ffffffff93d48067 R11: ffffffff8ae000eb R12: ffff88807b077800
R13: dffffc0000000000 R14: ffff88807b077e40 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564f4fc1e3a8 CR3: 000000000d57a000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 unix_gc+0x563/0x13b0 net/unix/garbage.c:319
 unix_release_sock+0xa93/0xf80 net/unix/af_unix.c:683
 unix_release+0x91/0xf0 net/unix/af_unix.c:1064
 __sock_release+0xb0/0x270 net/socket.c:659
 sock_close+0x1c/0x30 net/socket.c:1421
 __fput+0x270/0xb80 fs/file_table.c:376
 task_work_run+0x14f/0x250 kernel/task_work.c:180
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0xa8a/0x2ad0 kernel/exit.c:871
 do_group_exit+0xd4/0x2a0 kernel/exit.c:1020
 __do_sys_exit_group kernel/exit.c:1031 [inline]
 __se_sys_exit_group kernel/exit.c:1029 [inline]
 __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1029
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x6f/0x77
RIP: 0033:0x7f9d6cbdac09
Code: Unable to access opcode bytes at 0x7f9d6cbdabdf.
RSP: 002b:00007fff5952feb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9d6cbdac09
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 00007f9d6cc552b0 R08: ffffffffffffffb8 R09: 0000000000000006
R10: 0000000000000006 R11: 0000000000000246 R12: 00007f9d6cc552b0
R13: 0000000000000000 R14: 00007f9d6cc55d00 R15: 00007f9d6cbabe70
 </TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.801 msecs

Crashes (36):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/09 13:07 upstream 1f719a2f3fa6 7f07e9b0 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root INFO: task hung in unix_dgram_sendmsg
2024/02/09 13:03 upstream 1f719a2f3fa6 7f07e9b0 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in unix_dgram_sendmsg
2024/02/09 11:13 upstream 1f719a2f3fa6 7f07e9b0 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in unix_dgram_sendmsg
2024/02/09 10:51 upstream 1f719a2f3fa6 7f07e9b0 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce INFO: task hung in unix_dgram_sendmsg
2024/02/17 03:26 net 166c2c8a6a4d 578f7538 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce INFO: task hung in unix_dgram_sendmsg
2024/02/15 12:21 net 2ec197fda25f d9b1cdd5 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce INFO: task hung in unix_dgram_sendmsg
2024/02/28 12:00 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9abbc24128bc d367cbe5 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in unix_dgram_sendmsg
2024/02/20 13:08 upstream b401b621758e 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in unix_dgram_sendmsg
2024/02/20 08:10 upstream b401b621758e 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in unix_dgram_sendmsg
2024/02/20 08:07 upstream b401b621758e 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root INFO: task hung in unix_dgram_sendmsg
2024/02/20 08:07 upstream b401b621758e 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in unix_dgram_sendmsg
2024/02/18 12:21 upstream c02197fc9076 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce INFO: task hung in unix_dgram_sendmsg
2024/02/17 21:36 upstream c1ca10ceffbb 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root INFO: task hung in unix_dgram_sendmsg
2024/02/13 23:30 upstream c664e16bb1ba e66542d7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in unix_dgram_sendmsg
2024/02/13 23:30 upstream c664e16bb1ba e66542d7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce INFO: task hung in unix_dgram_sendmsg
2024/02/13 23:28 upstream c664e16bb1ba e66542d7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in unix_dgram_sendmsg
2024/02/12 00:16 upstream 7521f258ea30 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in unix_dgram_sendmsg
2024/02/12 00:13 upstream 7521f258ea30 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in unix_dgram_sendmsg
2024/02/12 00:10 upstream 7521f258ea30 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce INFO: task hung in unix_dgram_sendmsg
2024/02/09 19:49 upstream 1f719a2f3fa6 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce INFO: task hung in unix_dgram_sendmsg
2024/02/09 18:56 upstream 1f719a2f3fa6 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce INFO: task hung in unix_dgram_sendmsg
2024/02/09 09:29 upstream 1f719a2f3fa6 7f07e9b0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root INFO: task hung in unix_dgram_sendmsg
2024/02/09 09:18 upstream 1f719a2f3fa6 7f07e9b0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in unix_dgram_sendmsg
2024/02/09 08:36 upstream 1f719a2f3fa6 7f07e9b0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in unix_dgram_sendmsg
2024/02/09 07:36 upstream 1f719a2f3fa6 7f07e9b0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root INFO: task hung in unix_dgram_sendmsg
2024/02/09 06:37 upstream 1f719a2f3fa6 7f07e9b0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce INFO: task hung in unix_dgram_sendmsg
2024/02/09 05:59 upstream 1f719a2f3fa6 7f07e9b0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in unix_dgram_sendmsg
2024/02/13 23:28 upstream 7e90b5c295ec e66542d7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 INFO: task hung in unix_dgram_sendmsg
2024/02/09 07:57 upstream 1f719a2f3fa6 7f07e9b0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 INFO: task hung in unix_dgram_sendmsg
2024/02/21 14:23 net d80f8e96d47d 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce INFO: task hung in unix_dgram_sendmsg
2024/02/21 06:34 net 23f9c2c066e7 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce INFO: task hung in unix_dgram_sendmsg
2024/02/20 08:04 net 40b9385dd8e6 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce INFO: task hung in unix_dgram_sendmsg
2024/02/12 00:01 net 78e563f2d629 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce INFO: task hung in unix_dgram_sendmsg
2024/02/23 06:02 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9abbc24128bc 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in unix_dgram_sendmsg
2024/02/21 02:41 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e6ac7c55d3ec 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in unix_dgram_sendmsg
2024/02/20 08:08 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 83d49ede4b18 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in unix_dgram_sendmsg
* Struck through repros no longer work on HEAD.