syzbot


BUG: sleeping function called from invalid context in __fdget_pos

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+5d1bad8042a8f0e8117a@syzkaller.appspotmail.com
Fix commit: 821720b9f34e crypto: x86/aes-ni - add missing error checks in XTS code
First crash: 592d, last: 526d

Sample crash report:
RBP: 00007fde803a71d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffd9c6644bf R14: 00007fde803a7300 R15: 0000000000022000
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:938
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 8546, name: syz-executor.2
no locks held by syz-executor.2/8546.
Preemption disabled at:
[<ffffffff812ed565>] kernel_fpu_begin_mask+0x75/0x4c0 arch/x86/kernel/fpu/core.c:156
CPU: 0 PID: 8546 Comm: syz-executor.2 Not tainted 5.14.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1d3/0x29f lib/dump_stack.c:105
 ___might_sleep+0x4e5/0x6b0 kernel/sched/core.c:9154
 __mutex_lock_common+0xbe/0x3770 kernel/locking/mutex.c:938
 __mutex_lock kernel/locking/mutex.c:1104 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:1119
 __fdget_pos+0x24e/0x2f0 fs/file.c:974
 fdget_pos include/linux/file.h:75 [inline]
 ksys_read+0x79/0x2a0 fs/read_write.c:625
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x41936c
Code: ec 28 48 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 fc ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 48 89 44 24 08 e8 2f fd ff ff 48
RSP: 002b:00007fde803a7170 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 000000000041936c
RDX: 000000000000000f RSI: 00007fde803a71e0 RDI: 0000000000000005
RBP: 00007fde803a71d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffd9c6644bf R14: 00007fde803a7300 R15: 0000000000022000
BUG: scheduling while atomic: syz-executor.2/8546/0x00000002
no locks held by syz-executor.2/8546.
Modules linked in:
Preemption disabled at:
[<ffffffff812ed565>] kernel_fpu_begin_mask+0x75/0x4c0 arch/x86/kernel/fpu/core.c:156

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce-smack-root 2021/08/08 09:49 upstream 85a90500f9a1 6972b106 .config console log report info BUG: sleeping function called from invalid context in __fdget_pos
ci-upstream-kasan-gce 2021/07/02 23:50 upstream 3dbdb38e2869 55aa55c2 .config console log report info BUG: sleeping function called from invalid context in __fdget_pos
ci-upstream-kasan-gce-root 2021/06/24 19:17 upstream 7426cedc7dad ec865f6a .config console log report info BUG: sleeping function called from invalid context in __fdget_pos
ci-upstream-net-this-kasan-gce 2021/08/29 16:29 net 57f780f1c433 be2c130d .config console log report info BUG: sleeping function called from invalid context in __fdget_pos
* Struck through repros no longer work on HEAD.