syzbot


INFO: task hung in nfnetlink_rcv_msg (2)

Status: auto-closed as invalid on 2022/02/07 23:39
Subsystems: netfilter
[Documentation on labels]
First crash: 892d, last: 892d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in nfnetlink_rcv_msg (3) netfilter C done 5 497d 508d 22/26 fixed on 2023/06/08 14:41
upstream INFO: task hung in nfnetlink_rcv_msg netfilter 30 1255d 1564d 0/26 auto-closed as invalid on 2021/03/11 10:49

Sample crash report:
INFO: task syz-executor.1:31825 blocked for more than 142 seconds.
      Not tainted 5.15.0-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.1  state:D stack:24392 pid:31825 ppid:  6518 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4969 [inline]
 __schedule+0xa9a/0x4940 kernel/sched/core.c:6250
 schedule+0xd2/0x260 kernel/sched/core.c:6323
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6382
 __mutex_lock_common kernel/locking/mutex.c:680 [inline]
 __mutex_lock+0xa32/0x12f0 kernel/locking/mutex.c:740
 nfnl_lock net/netfilter/nfnetlink.c:93 [inline]
 nfnetlink_rcv_msg+0xaaa/0x13f0 net/netfilter/nfnetlink.c:290
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2491
 nfnetlink_rcv+0x1ac/0x420 net/netfilter/nfnetlink.c:654
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x86d/0xda0 net/netlink/af_netlink.c:1916
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:724
 sock_no_sendpage+0xf6/0x140 net/core/sock.c:3080
 kernel_sendpage.part.0+0x1a0/0x340 net/socket.c:3504
 kernel_sendpage net/socket.c:3501 [inline]
 sock_sendpage+0xe5/0x140 net/socket.c:1003
 pipe_to_sendpage+0x2ad/0x380 fs/splice.c:364
 splice_from_pipe_feed fs/splice.c:418 [inline]
 __splice_from_pipe+0x43e/0x8a0 fs/splice.c:562
 splice_from_pipe fs/splice.c:597 [inline]
 generic_splice_sendpage+0xd4/0x140 fs/splice.c:746
 do_splice_from fs/splice.c:767 [inline]
 direct_splice_actor+0x110/0x180 fs/splice.c:936
 splice_direct_to_actor+0x34b/0x8c0 fs/splice.c:891
 do_splice_direct+0x1b3/0x280 fs/splice.c:979
 do_sendfile+0xaf2/0x1250 fs/read_write.c:1245
 __do_sys_sendfile64 fs/read_write.c:1310 [inline]
 __se_sys_sendfile64 fs/read_write.c:1296 [inline]
 __x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1296
 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+0x44/0xae
RIP: 0033:0x7f714d720ae9
RSP: 002b:00007f714ac96188 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f714d833f60 RCX: 00007f714d720ae9
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000005
RBP: 00007f714d77af45 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000100000101 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffb8f2e70f R14: 00007f714ac96300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8b982da0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6446
4 locks held by kworker/u4:5/1016:
 #0: ffff888011a2b138 ((wq_completion)netns){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff888011a2b138 ((wq_completion)netns){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
 #0: ffff888011a2b138 ((wq_completion)netns){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1198 [inline]
 #0: ffff888011a2b138 ((wq_completion)netns){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:634 [inline]
 #0: ffff888011a2b138 ((wq_completion)netns){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:661 [inline]
 #0: ffff888011a2b138 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x896/0x1690 kernel/workqueue.c:2268
 #1: ffffc900042cfdb0 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x8ca/0x1690 kernel/workqueue.c:2272
 #2: ffffffff8d0de250 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0x9b/0xb00 net/core/net_namespace.c:555
 #3: ffffffff90604458 (nfnl_subsys_ipset){+.+.}-{3:3}, at: ip_set_net_exit+0x145/0x5c0 net/netfilter/ipset/ip_set_core.c:2343
1 lock held by in:imklog/6197:
 #0: ffff888071e24ff0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:990
2 locks held by syz-executor.3/31725:
1 lock held by syz-executor.1/31825:
 #0: ffffffff90604458 (nfnl_subsys_ipset){+.+.}-{3:3}, at: nfnl_lock net/netfilter/nfnetlink.c:93 [inline]
 #0: ffffffff90604458 (nfnl_subsys_ipset){+.+.}-{3:3}, at: nfnetlink_rcv_msg+0xaaa/0x13f0 net/netfilter/nfnetlink.c:290

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 nmi_cpu_backtrace.cold+0x47/0x144 lib/nmi_backtrace.c:105
 nmi_trigger_cpumask_backtrace+0x1ae/0x220 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xc1d/0xf50 kernel/hung_task.c:295
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 2933 Comm: systemd-journal Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:slab_alloc_node mm/slub.c:3197 [inline]
RIP: 0010:slab_alloc mm/slub.c:3221 [inline]
RIP: 0010:kmem_cache_alloc+0xf5/0x390 mm/slub.c:3226
Code: 48 8b 01 48 83 79 10 00 48 89 04 24 0f 84 73 02 00 00 48 85 c0 0f 84 6a 02 00 00 48 8b 7d 00 8b 4d 28 40 f6 c7 0f 48 8b 1c 08 <0f> 85 74 02 00 00 48 8d 4a 08 65 48 0f c7 0f 0f 94 c0 84 c0 74 b0
RSP: 0018:ffffc90002a4fe08 EFLAGS: 00000246
RAX: ffff888021739900 RBX: 0000000000000000 RCX: 0000000000000060
RDX: 00000000000dc3c0 RSI: 00000000000000c0 RDI: 0000000000040530
RBP: ffff888140006140 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: ffffffff814e69cf R14: 0000000000000cc0 R15: 0000000000000cc0
FS:  00007f65992228c0(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f65960cd000 CR3: 0000000021a9a000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 prepare_creds+0x3f/0x7b0 kernel/cred.c:260
 access_override_creds fs/open.c:351 [inline]
 do_faccessat+0x3f4/0x850 fs/open.c:415
 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+0x44/0xae
RIP: 0033:0x7f65984dd9c7
Code: 83 c4 08 48 3d 01 f0 ff ff 73 01 c3 48 8b 0d c8 d4 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 b8 15 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 d4 2b 00 f7 d8 64 89 01 48
RSP: 002b:00007fffc98e0768 EFLAGS: 00000246 ORIG_RAX: 0000000000000015
RAX: ffffffffffffffda RBX: 00007fffc98e3680 RCX: 00007f65984dd9c7
RDX: 00007f6598f4ea00 RSI: 0000000000000000 RDI: 000055bbe18599a3
RBP: 00007fffc98e07a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000069 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fffc98e3680 R15: 00007fffc98e0c90
 </TASK>
----------------
Code disassembly (best guess):
   0:	48 8b 01             	mov    (%rcx),%rax
   3:	48 83 79 10 00       	cmpq   $0x0,0x10(%rcx)
   8:	48 89 04 24          	mov    %rax,(%rsp)
   c:	0f 84 73 02 00 00    	je     0x285
  12:	48 85 c0             	test   %rax,%rax
  15:	0f 84 6a 02 00 00    	je     0x285
  1b:	48 8b 7d 00          	mov    0x0(%rbp),%rdi
  1f:	8b 4d 28             	mov    0x28(%rbp),%ecx
  22:	40 f6 c7 0f          	test   $0xf,%dil
  26:	48 8b 1c 08          	mov    (%rax,%rcx,1),%rbx
* 2a:	0f 85 74 02 00 00    	jne    0x2a4 <-- trapping instruction
  30:	48 8d 4a 08          	lea    0x8(%rdx),%rcx
  34:	65 48 0f c7 0f       	cmpxchg16b %gs:(%rdi)
  39:	0f 94 c0             	sete   %al
  3c:	84 c0                	test   %al,%al
  3e:	74 b0                	je     0xfffffff0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/11/09 23:30 net-next-old cc0356d6a02e 59bcaf9a .config console log report info ci-upstream-net-kasan-gce INFO: task hung in nfnetlink_rcv_msg
* Struck through repros no longer work on HEAD.