syzbot


BUG: sleeping function called from invalid context in vfree (2)

Status: upstream: reported C repro on 2025/08/18 08:05
Subsystems: fs net
[Documentation on labels]
Reported-by: syzbot+f65a2014305525a9f816@syzkaller.appspotmail.com
First crash: 48d, last: 28d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [fs?] BUG: sleeping function called from invalid context in vfree (2) 3 (5) 2025/08/18 13:19
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: sleeping function called from invalid context in vfree sound 5 1 314d 314d 28/29 fixed on 2025/05/06 15:33
Last patch testing requests (4)
Created Duration User Patch Repo Result
2025/09/21 16:53 24m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2025/09/21 16:53 24m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2025/09/21 16:53 25m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2025/08/18 10:08 1h00m hdanton@sina.com patch upstream OK log

Sample crash report:
BUG: sleeping function called from invalid context at mm/vmalloc.c:3409
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 14157, name: syz.2.1989
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
1 lock held by syz.2.1989/14157:
 #0: ffff88809cf5d258 (&u->iolock){+.+.}-{4:4}, at: __unix_dgram_recvmsg+0x1e1/0xd60 net/unix/af_unix.c:2598
Preemption disabled at:
[<ffffffff8b7acfde>] preempt_schedule+0xae/0xc0 kernel/sched/core.c:7169
CPU: 0 UID: 0 PID: 14157 Comm: syz.2.1989 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 __might_resched+0x495/0x610 kernel/sched/core.c:8957
 vfree+0x4d/0x400 mm/vmalloc.c:3409
 __mmdrop+0x323/0x580 kernel/fork.c:692
 mmdrop include/linux/sched/mm.h:55 [inline]
 mmdrop_sched include/linux/sched/mm.h:83 [inline]
 mmdrop_lazy_tlb_sched include/linux/sched/mm.h:110 [inline]
 finish_task_switch+0x3ee/0x950 kernel/sched/core.c:5250
 context_switch kernel/sched/core.c:5360 [inline]
 __schedule+0x17a0/0x4cc0 kernel/sched/core.c:6961
 preempt_schedule_common+0x83/0xd0 kernel/sched/core.c:7145
 preempt_schedule+0xae/0xc0 kernel/sched/core.c:7169
 preempt_schedule_thunk+0x16/0x30 arch/x86/entry/thunk.S:12
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
 _raw_spin_unlock_irqrestore+0xfd/0x110 kernel/locking/spinlock.c:194
 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline]
 __wake_up_common_lock+0x190/0x1f0 kernel/sched/wait.c:127
 __unix_dgram_recvmsg+0x486/0xd60 net/unix/af_unix.c:2626
 sock_recvmsg_nosec+0x183/0x1c0 net/socket.c:1065
 ____sys_recvmsg+0x3aa/0x460 net/socket.c:2832
 ___sys_recvmsg+0x1b5/0x510 net/socket.c:2876
 do_recvmmsg+0x307/0x770 net/socket.c:2971
 __sys_recvmmsg net/socket.c:3045 [inline]
 __do_sys_recvmmsg net/socket.c:3068 [inline]
 __se_sys_recvmmsg net/socket.c:3061 [inline]
 __x64_sys_recvmmsg+0x190/0x240 net/socket.c:3061
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8a9818ebe9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f8a963d5038 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007f8a983b6090 RCX: 00007f8a9818ebe9
RDX: 0000000000010106 RSI: 00002000000000c0 RDI: 0000000000000004
RBP: 00007f8a98211e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f8a983b6128 R14: 00007f8a983b6090 R15: 00007f8a984dfa28
 </TASK>

Crashes (223):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/28 18:15 upstream 07d9df80082b 443c11c7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce BUG: sleeping function called from invalid context in vfree
2025/08/21 09:20 upstream 41cd3fd15263 0b9605c8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root BUG: sleeping function called from invalid context in vfree
2025/09/07 15:11 upstream b236920731dd d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/07 10:57 upstream b236920731dd d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/07 10:11 upstream b236920731dd d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/07 08:05 upstream b236920731dd d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/07 04:44 upstream b236920731dd d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/06 22:24 upstream b236920731dd d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/06 08:21 upstream c8ed9b5c02a5 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/05 20:57 upstream c8ed9b5c02a5 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/05 19:40 upstream c8ed9b5c02a5 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/05 18:36 upstream d69eb204c255 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/05 17:15 upstream d69eb204c255 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/05 13:28 upstream d69eb204c255 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/05 07:14 upstream d69eb204c255 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/05 06:07 upstream d69eb204c255 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/05 02:46 upstream 08b06c30a445 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/05 01:35 upstream 08b06c30a445 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/04 21:56 upstream 08b06c30a445 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/04 18:18 upstream 08b06c30a445 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/04 17:03 upstream 08b06c30a445 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/04 15:57 upstream b9a10f876409 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/04 14:13 upstream b9a10f876409 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/04 03:13 upstream b9a10f876409 d291dd2d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/03 20:32 upstream ec299e4dc21e 19216959 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/03 15:10 upstream e6b9dce0aeeb 19216959 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/03 12:14 upstream e6b9dce0aeeb 96a211bc .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/03 03:24 upstream e6b9dce0aeeb 96a211bc .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/02 23:40 upstream e6b9dce0aeeb 96a211bc .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/02 22:15 upstream e6b9dce0aeeb 96a211bc .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/02 20:13 upstream b320789d6883 96a211bc .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/02 19:10 upstream b320789d6883 96a211bc .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/02 16:50 upstream b320789d6883 96a211bc .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/02 11:39 upstream b320789d6883 96a211bc .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/02 10:03 upstream b320789d6883 807a3b61 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/02 08:33 upstream b320789d6883 807a3b61 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/02 06:38 upstream b320789d6883 807a3b61 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/02 04:02 upstream b320789d6883 807a3b61 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/02 03:27 upstream b320789d6883 807a3b61 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/02 00:18 upstream b320789d6883 807a3b61 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/01 19:10 upstream b320789d6883 807a3b61 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/01 17:32 upstream b320789d6883 807a3b61 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/01 10:16 upstream b320789d6883 807a3b61 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/01 09:02 upstream b320789d6883 807a3b61 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/09/01 07:46 upstream b320789d6883 807a3b61 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vfree
2025/08/17 23:10 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8f5ae30d69d7 1804e95e .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: sleeping function called from invalid context in vfree
2025/08/17 22:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8f5ae30d69d7 1804e95e .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: sleeping function called from invalid context in vfree
2025/08/17 22:23 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8f5ae30d69d7 1804e95e .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: sleeping function called from invalid context in vfree
* Struck through repros no longer work on HEAD.