syzbot


INFO: task hung in ima_file_free

Status: closed as invalid on 2022/02/08 09:50
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 321d, last: 321d

Sample crash report:
INFO: task syz-executor.0:24034 blocked for more than 143 seconds.
      Not tainted 5.16.0-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0  state:D stack:27992 pid:24034 ppid:  3643 flags:0x20000004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4986 [inline]
 __schedule+0xab2/0x4f00 kernel/sched/core.c:6296
 schedule+0xd2/0x260 kernel/sched/core.c:6369
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6428
 __mutex_lock_common kernel/locking/mutex.c:673 [inline]
 __mutex_lock+0xa32/0x12f0 kernel/locking/mutex.c:733
 ima_check_last_writer security/integrity/ima/ima_main.c:164 [inline]
 ima_file_free+0x150/0x420 security/integrity/ima/ima_main.c:198
 __fput+0x1c1/0x9f0 fs/file_table.c:274
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300
 __do_fast_syscall_32+0x72/0xf0 arch/x86/entry/common.c:181
 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
RIP: 0023:0xf6eff549
RSP: 002b:00000000f7590b20 EFLAGS: 00000286 ORIG_RAX: 0000000000000006
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000002
RDX: 0000000000000000 RSI: 00000000f7037000 RDI: 0000000000086945
RBP: 00000000f705d0a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8bb854a0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6460
1 lock held by klogd/2963:
2 locks held by getty/3287:
 #0: ffff888023794098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:244
 #1: ffffc90002b962e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xcf0/0x1230 drivers/tty/n_tty.c:2077
1 lock held by syz-executor.0/24034:
 #0: ffff8880417f7f20 (&iint->mutex){+.+.}-{3:3}, at: ima_check_last_writer security/integrity/ima/ima_main.c:164 [inline]
 #0: ffff8880417f7f20 (&iint->mutex){+.+.}-{3:3}, at: ima_file_free+0x150/0x420 security/integrity/ima/ima_main.c:198
1 lock held by syz-executor.0/24042:

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.16.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:111
 nmi_trigger_cpumask_backtrace+0x1b3/0x230 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 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 2963 Comm: klogd Not tainted 5.16.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:qlink_to_object mm/kasan/quarantine.c:129 [inline]
RIP: 0010:qlink_free mm/kasan/quarantine.c:134 [inline]
RIP: 0010:qlist_free_all+0x43/0xf0 mm/kasan/quarantine.c:165
Code: ad 00 00 00 49 be 00 00 00 00 00 ea ff ff 49 89 fd 45 31 ff 49 bc 00 00 00 00 00 fc ff df eb 2d 48 63 97 c0 00 00 00 48 8b 1e <48> 29 d6 48 89 f2 48 c1 ea 03 42 c6 04 22 fb 48 c7 c2 f9 ed be 81
RSP: 0018:ffffc90001b0f898 EFLAGS: 00000202
RAX: 00fff00000010200 RBX: ffff8880195c7500 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffff888048a70000 RDI: ffff888010c42140
RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000002e
R10: ffffffff8134d84a R11: 000000000000003f R12: dffffc0000000000
R13: ffffc90001b0f8d8 R14: ffffea0000000000 R15: 0000000000000000
FS:  00007fdc191d7800(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c00f924028 CR3: 000000007f098000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272
 __kasan_slab_alloc+0xa2/0xc0 mm/kasan/common.c:447
 kasan_slab_alloc include/linux/kasan.h:260 [inline]
 slab_post_alloc_hook mm/slab.h:738 [inline]
 slab_alloc_node mm/slub.c:3230 [inline]
 kmem_cache_alloc_node+0x255/0x3f0 mm/slub.c:3266
 __alloc_skb+0x215/0x340 net/core/skbuff.c:414
 alloc_skb include/linux/skbuff.h:1158 [inline]
 alloc_skb_with_frags+0x93/0x620 net/core/skbuff.c:5956
 sock_alloc_send_pskb+0x793/0x920 net/core/sock.c:2581
 unix_dgram_sendmsg+0x414/0x1a10 net/unix/af_unix.c:1896
 sock_sendmsg_nosec net/socket.c:705 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:725
 __sys_sendto+0x21c/0x320 net/socket.c:2040
 __do_sys_sendto net/socket.c:2052 [inline]
 __se_sys_sendto net/socket.c:2048 [inline]
 __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2048
 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:0x7fdc193730ac
Code: 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 19 45 31 c9 45 31 c0 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 64 c3 0f 1f 00 55 48 83 ec 20 48 89 54 24 10
RSP: 002b:00007fff16c3a5e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fdc193730ac
RDX: 0000000000000054 RSI: 000055b1a1b8b6b0 RDI: 0000000000000003
RBP: 000055b1a1b82910 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000004000 R11: 0000000000000246 R12: 0000000000000014
R13: 0000000000000001 R14: 00007fdc194ee77d R15: 00007fff16c3a6f8
 </TASK>
----------------
Code disassembly (best guess), 2 bytes skipped:
   0:	00 00                	add    %al,(%rax)
   2:	49 be 00 00 00 00 00 	movabs $0xffffea0000000000,%r14
   9:	ea ff ff
   c:	49 89 fd             	mov    %rdi,%r13
   f:	45 31 ff             	xor    %r15d,%r15d
  12:	49 bc 00 00 00 00 00 	movabs $0xdffffc0000000000,%r12
  19:	fc ff df
  1c:	eb 2d                	jmp    0x4b
  1e:	48 63 97 c0 00 00 00 	movslq 0xc0(%rdi),%rdx
  25:	48 8b 1e             	mov    (%rsi),%rbx
* 28:	48 29 d6             	sub    %rdx,%rsi <-- trapping instruction
  2b:	48 89 f2             	mov    %rsi,%rdx
  2e:	48 c1 ea 03          	shr    $0x3,%rdx
  32:	42 c6 04 22 fb       	movb   $0xfb,(%rdx,%r12,1)
  37:	48 c7 c2 f9 ed be 81 	mov    $0xffffffff81beedf9,%rdx

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-386 2022/01/15 20:48 upstream a33f5c380c4b 723cfaf0 .config log report info INFO: task hung in ima_file_free
* Struck through repros no longer work on HEAD.