syzbot


BUG: sleeping function called from invalid context in get_timespec64

Status: upstream: reported C repro on 2024/02/10 10:21
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+5a426726a832ad9d87e3@syzkaller.appspotmail.com
First crash: 315d, last: 315d
Fix commit to backport (bisect log) :
tree: upstream
commit f19a4050455aad847fb93f18dc1fe502eb60f989
Author: Jiri Olsa <jolsa@kernel.org>
Date: Thu Dec 15 21:44:29 2022 +0000

  bpf: Do cleanup in bpf_bprintf_cleanup only when needed

  
Bug presence (2)
Date Name Commit Repro Result
2024/02/10 linux-6.1.y (ToT) f1bb70486c9c C [report] BUG: sleeping function called from invalid context in sys_rt_sigprocmask
2024/02/10 upstream (ToT) 4a7bbe7519b6 C Didn't crash
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/02/16 12:36 4h56m fix candidate upstream OK (1) job log

Sample crash report:
BUG: sleeping function called from invalid context at lib/usercopy.c:14
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 3548, name: syz-executor143
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
no locks held by syz-executor143/3548.
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 1 PID: 3548 Comm: syz-executor143 Not tainted 6.1.77-syzkaller #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+0x1e3/0x2cb lib/dump_stack.c:106
 __might_resched+0x5cb/0x780 kernel/sched/core.c:9942
 __might_fault+0x69/0x110 mm/memory.c:5808
 _copy_from_user+0x26/0x170 lib/usercopy.c:14
 copy_from_user include/linux/uaccess.h:161 [inline]
 get_timespec64+0x93/0x270 kernel/time/time.c:787
 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1297 [inline]
 __se_sys_clock_nanosleep+0x1a1/0x3b0 kernel/time/posix-timers.c:1285
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f94de3524c3
Code: 00 00 00 00 00 66 90 83 ff 03 74 7b 83 ff 02 b8 fa ff ff ff 49 89 ca 0f 44 f8 80 3d be 1b 05 00 00 74 14 b8 e6 00 00 00 0f 05 <f7> d8 c3 66 2e 0f 1f 84 00 00 00 00 00 48 83 ec 28 48 89 54 24 10
RSP: 002b:00007ffcff1739f8 EFLAGS: 00000202 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 0000000000000dfc RCX: 00007f94de3524c3
RDX: 00007ffcff173a10 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00000000000f4240 R08: 00007ffcff1890b0 R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000c72b
R13: 00007ffcff173a4c R14: 00007ffcff173a60 R15: 00007ffcff173a50
 </TASK>
BUG: scheduling while atomic: syz-executor143/3548/0x00000002
no locks held by syz-executor143/3548.
Modules linked in:
Preemption disabled at:
[<0000000000000000>] 0x0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/10 10:21 linux-6.1.y f1bb70486c9c 77b23aa1 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf BUG: sleeping function called from invalid context in get_timespec64
* Struck through repros no longer work on HEAD.