syzbot


BUG: sleeping function called from invalid context in __vunmap

Status: upstream: reported C repro on 2024/02/18 12:21
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+a6749651411384b9ce17@syzkaller.appspotmail.com
First crash: 277d, last: 274d
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/18 linux-6.1.y (ToT) 8b4118fabd6e C [report] INFO: rcu detected stall in corrupted
2024/02/18 upstream (ToT) c02197fc9076 C Didn't crash
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 BUG: sleeping function called from invalid context in __vunmap origin:lts-only C unreliable 1 286d 286d 0/3 auto-obsoleted due to no activity on 2024/10/04 07:20
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/03/03 19:31 6h38m fix candidate upstream OK (1) job log

Sample crash report:
BUG: sleeping function called from invalid context at mm/vmalloc.c:2718
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 6909, name: syz-executor496
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
no locks held by syz-executor496/6909.
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 0 PID: 6909 Comm: syz-executor496 Not tainted 6.1.78-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
 __vunmap+0x847/0x9a0 mm/vmalloc.c:2718
 bpf_check+0xf9aa/0x15ea0 kernel/bpf/verifier.c:15757
 bpf_prog_load+0x12df/0x1bb0 kernel/bpf/syscall.c:2631
 __sys_bpf+0x382/0x6c0 kernel/bpf/syscall.c:5005
 __do_sys_bpf kernel/bpf/syscall.c:5109 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5107 [inline]
 __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5107
 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:0x7f7466385ed9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 1c 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcab769e48 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7466385ed9
RDX: 0000000000000090 RSI: 00000000200004c0 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
BUG: scheduling while atomic: syz-executor496/6909/0x00000002
1 lock held by syz-executor496/6909:
 #0: ffffffff8cfdcba8 (text_mutex){+.+.}-{3:3}, at: text_poke_copy+0x29/0x90 arch/x86/kernel/alternative.c:1277
Modules linked in:
Preemption disabled at:
[<0000000000000000>] 0x0

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/21 06:06 linux-6.1.y 8b4118fabd6e 3af7dd65 .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 __vunmap
2024/02/18 12:21 linux-6.1.y 8b4118fabd6e 578f7538 .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 __vunmap
* Struck through repros no longer work on HEAD.