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

0 views
Skip to first unread message

syzbot

unread,
Feb 12, 2024, 2:27:16 AMFeb 12
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=153ff5b8180000
kernel config: https://syzkaller.appspot.com/x/.config?x=c170eb20d8be8542
dashboard link: https://syzkaller.appspot.com/bug?extid=3dc9f5ef27e1d1120b69
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=157c6df4180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13878592180000

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+3dc9f5...@syzkaller.appspotmail.com

BUG: sleeping function called from invalid context at mm/rmap.c:127
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 4120, name: syz-executor394
no locks held by syz-executor394/4120.
Preemption disabled at:
[<ffffffff8174f806>] is_module_text_address+0x16/0x140 kernel/module.c:4758
CPU: 0 PID: 4120 Comm: syz-executor394 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
anon_vma_free mm/rmap.c:127 [inline]
__put_anon_vma+0x82/0x2d0 mm/rmap.c:2252
put_anon_vma include/linux/rmap.h:114 [inline]
unlink_anon_vmas+0x48f/0x5f0 mm/rmap.c:440
free_pgtables+0x76/0x2a0 mm/memory.c:412
exit_mmap+0x3c5/0x670 mm/mmap.c:3187
__mmput+0x112/0x3b0 kernel/fork.c:1126
exit_mm+0x688/0x7f0 kernel/exit.c:548
do_exit+0x626/0x2480 kernel/exit.c:859
do_group_exit+0x144/0x310 kernel/exit.c:994
__do_sys_exit_group kernel/exit.c:1005 [inline]
__se_sys_exit_group kernel/exit.c:1003 [inline]
__x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1003
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:0x7ffa66f92539
Code: Unable to access opcode bytes at RIP 0x7ffa66f9250f.
RSP: 002b:00007ffdd47fd908 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ffa66f92539
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 00007ffa670132d0 R08: ffffffffffffffb8 R09: 00005555574e5610
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffa670132d0
R13: 0000000000000000 R14: 00007ffa67014da0 R15: 00007ffa66f636d0
</TASK>
BUG: scheduling while atomic: syz-executor394/4120/0x00000002
no locks held by syz-executor394/4120.
Modules linked in:
Preemption disabled at:
[<ffffffff8174f806>] is_module_text_address+0x16/0x140 kernel/module.c:4758


---
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 15, 2024, 10:12:18 PMFeb 15
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: f1bb70486c9c Linux 6.1.77
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12b62c52180000
kernel config: https://syzkaller.appspot.com/x/.config?x=39447811cb133e7e
dashboard link: https://syzkaller.appspot.com/bug?extid=22045f0da050e2d0a4c1
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=16e267dc180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17ab6134180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b4e70e158586/disk-f1bb7048.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6fd889f445ac/vmlinux-f1bb7048.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3c8bf6d15492/bzImage-f1bb7048.xz

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

BUG: sleeping function called from invalid context at mm/rmap.c:130
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5591, name: syz-executor130
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
1 lock held by syz-executor130/5591:
#0: ffff888078576a58 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock include/linux/mmap_lock.h:71 [inline]
#0: ffff888078576a58 (&mm->mmap_lock){++++}-{3:3}, at: exit_mmap+0x29a/0x9f0 mm/mmap.c:3235
Preemption disabled at:
[<ffffffff817677fa>] is_module_text_address+0x1a/0x160 kernel/module/main.c:3097
CPU: 0 PID: 5591 Comm: syz-executor130 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
anon_vma_free mm/rmap.c:130 [inline]
__put_anon_vma+0x80/0x2d0 mm/rmap.c:2375
put_anon_vma include/linux/rmap.h:116 [inline]
unlink_anon_vmas+0x48c/0x5e0 mm/rmap.c:443
free_pgtables+0x344/0x4f0 mm/memory.c:430
exit_mmap+0x3bb/0x9f0 mm/mmap.c:3237
__mmput+0x115/0x3c0 kernel/fork.c:1199
exit_mm+0x226/0x300 kernel/exit.c:563
do_exit+0x9f6/0x26a0 kernel/exit.c:856
do_group_exit+0x202/0x2b0 kernel/exit.c:1019
__do_sys_exit_group kernel/exit.c:1030 [inline]
__se_sys_exit_group kernel/exit.c:1028 [inline]
__x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1028
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:0x7f7217d2b039
Code: Unable to access opcode bytes at 0x7f7217d2b00f.
RSP: 002b:00007ffedddf17d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7217d2b039
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 00007f7217da72b0 R08: ffffffffffffffb8 R09: 00000000000000a0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f7217da72b0
R13: 0000000000000000 R14: 00007f7217da7d20 R15: 00007f7217cfc1d0
</TASK>
BUG: scheduling while atomic: syz-executor130/5591/0x00000002
no locks held by syz-executor130/5591.
Modules linked in:
Preemption disabled at:
[<ffffffff817677fa>] is_module_text_address+0x1a/0x160 kernel/module/main.c:3097
Reply all
Reply to author
Forward
0 new messages