[v5.15] BUG: sleeping function called from invalid context in __vunmap

0 views
Skip to first unread message

syzbot

unread,
Feb 9, 2024, 3:11:18 AMFeb 9
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 6139f2a02fe0 Linux 5.15.148
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=121c8920180000
kernel config: https://syzkaller.appspot.com/x/.config?x=c170eb20d8be8542
dashboard link: https://syzkaller.appspot.com/bug?extid=6dd38ad504982f1e65ab
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1398acec180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=165cb75c180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2ac68f24aed3/disk-6139f2a0.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e8982a3768c5/vmlinux-6139f2a0.xz
kernel image: https://storage.googleapis.com/syzbot-assets/eb272dd019ce/bzImage-6139f2a0.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6dd38a...@syzkaller.appspotmail.com

BUG: sleeping function called from invalid context at mm/vmalloc.c:2622
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 4138, name: syz-executor200
no locks held by syz-executor200/4138.
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 1 PID: 4138 Comm: syz-executor200 Not tainted 5.15.148-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_sleep+0x547/0x6a0 kernel/sched/core.c:9626
__vunmap+0x8e7/0xa20 mm/vmalloc.c:2622
bpf_check+0x6cb6/0x12d00 kernel/bpf/verifier.c:14179
bpf_prog_load+0x12b3/0x1b60 kernel/bpf/syscall.c:2325
__sys_bpf+0x343/0x670 kernel/bpf/syscall.c:4623
__do_sys_bpf kernel/bpf/syscall.c:4727 [inline]
__se_sys_bpf kernel/bpf/syscall.c:4725 [inline]
__x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:4725
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+0x61/0xcb
RIP: 0033:0x7f49fb1ea659
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 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:00007ffe7136f2e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 000000000000eed9 RCX: 00007f49fb1ea659
RDX: 0000000000000049 RSI: 0000000020000980 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000004
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe7136f30c
R13: 00007ffe7136f340 R14: 00007ffe7136f320 R15: 0000000000000000
</TASK>
BUG: scheduling while atomic: syz-executor200/4138/0x00000002
no locks held by syz-executor200/4138.
Modules linked in:
Preemption disabled at:
[<0000000000000000>] 0x0


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Feb 18, 2024, 7:21:25 AMFeb 18
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 8b4118fabd6e Linux 6.1.78
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13467e94180000
kernel config: https://syzkaller.appspot.com/x/.config?x=93bcaf862378a9b8
dashboard link: https://syzkaller.appspot.com/bug?extid=a6749651411384b9ce17
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17758a3c180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13516cf8180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/9862fbd3cc89/disk-8b4118fa.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/fda010942bf1/vmlinux-8b4118fa.xz
kernel image: https://storage.googleapis.com/syzbot-assets/23852cd010cb/bzImage-8b4118fa.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a67496...@syzkaller.appspotmail.com

BUG: sleeping function called from invalid context at mm/vmalloc.c:2718
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 4345, name: syz-executor416
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
no locks held by syz-executor416/4345.
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 0 PID: 4345 Comm: syz-executor416 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:0x7f9af073bee9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 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:00007fff6edcdf38 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9af073bee9
RDX: 0000000000000090 RSI: 00000000200004c0 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000000000a0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
BUG: scheduling while atomic: syz-executor416/4345/0x00000002
no locks held by syz-executor416/4345.

syzbot

unread,
Mar 3, 2024, 9:10:04 PMMar 3
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit f19a4050455aad847fb93f18dc1fe502eb60f989
git tree: upstream
Author: Jiri Olsa <jo...@kernel.org>
Date: Thu Dec 15 21:44:29 2022 +0000

bpf: Do cleanup in bpf_bprintf_cleanup only when needed

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10d93316180000
Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

syzbot

unread,
Mar 5, 2024, 12:49:06 AMMar 5
to syzkaller...@googlegroups.com
The commit that was suspected to fix the issue was backported to the fuzzed
kernel trees.

commit 95b7476f6f68d725c474e3348e89436b0abde62a
Author: <jo...@kernel.org>
Date: Thu Dec 15 21:44:29 2022 +0000

bpf: Do cleanup in bpf_bprintf_cleanup only when needed

If you believe this is correct, please reply with
#syz fix: bpf: Do cleanup in bpf_bprintf_cleanup only when needed

The commit was initially detected here:

commit f19a4050455aad847fb93f18dc1fe502eb60f989
git tree: upstream
Author: Jiri Olsa <jo...@kernel.org>
Date: Thu Dec 15 21:44:29 2022 +0000

bpf: Do cleanup in bpf_bprintf_cleanup only when needed

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10d93316180000
Reply all
Reply to author
Forward
0 new messages