[Android 6.1] kernel BUG in mmap_region

2 views
Skip to first unread message

syzbot

unread,
Jun 11, 2023, 12:08:05 PM6/11/23
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 7641ff0a300a ANDROID: mm: Avoid merging cma with others
git tree: android14-6.1
console+strace: https://syzkaller.appspot.com/x/log.txt?x=17e75807280000
kernel config: https://syzkaller.appspot.com/x/.config?x=f3a6e543620145da
dashboard link: https://syzkaller.appspot.com/bug?extid=af3fbbcc17d7f34395be
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=158d4c65280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1773e543280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/9d5884ec359b/disk-7641ff0a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5d352bc65f71/vmlinux-7641ff0a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0fa4985ccfe1/bzImage-7641ff0a.xz

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

RBP: 00007fff8c118920 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000012 R11: 0000000000000246 R12: 0000000000000004
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
------------[ cut here ]------------
kernel BUG at mm/mmap.c:2664!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 293 Comm: syz-executor166 Not tainted 6.1.25-syzkaller-00020-g7641ff0a300a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:mmap_region+0x2256/0x2380 mm/mmap.c:2664
Code: 03 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 1e fc ff ff 48 89 df e8 2b 29 09 00 e9 11 fc ff ff e8 91 44 c3 ff 0f 0b e8 8a 44 c3 ff <0f> 0b 65 8b 05 39 95 51 7e 41 89 c6 4c 89 f0 48 c1 e8 06 48 8d 3c
RSP: 0018:ffffc90000de7a40 EFLAGS: 00010293
RAX: ffffffff81b07c16 RBX: 0000000020ffffff RCX: ffff88811ceea800
RDX: 0000000000000000 RSI: 0000000020ffffff RDI: 0000000021000000
RBP: ffffc90000de7c50 R08: ffffffff81b06861 R09: ffffffff84fc5753
R10: 0000000000000003 R11: ffff88811ceea800 R12: ffffc90000de7ba8
R13: dffffc0000000000 R14: 0000000020ffd000 R15: 0000000021000000
FS: 0000555557204300(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000114 CR3: 000000011f3b7000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
do_mmap+0x853/0xe30 mm/mmap.c:1453
vm_mmap_pgoff+0x208/0x430 mm/util.c:524
ksys_mmap_pgoff+0x15d/0x1e0 mm/mmap.c:1499
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline]
__x64_sys_mmap+0x103/0x120 arch/x86/kernel/sys_x86_64.c:86
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+0x63/0xcd
RIP: 0033:0x7f3d169f6769
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff8c118908 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f3d169f6769
RDX: 0000000000000000 RSI: 0000000000003000 RDI: 0000000020ffd000
RBP: 00007fff8c118920 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000012 R11: 0000000000000246 R12: 0000000000000004
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:mmap_region+0x2256/0x2380 mm/mmap.c:2664
Code: 03 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 1e fc ff ff 48 89 df e8 2b 29 09 00 e9 11 fc ff ff e8 91 44 c3 ff 0f 0b e8 8a 44 c3 ff <0f> 0b 65 8b 05 39 95 51 7e 41 89 c6 4c 89 f0 48 c1 e8 06 48 8d 3c
RSP: 0018:ffffc90000de7a40 EFLAGS: 00010293
RAX: ffffffff81b07c16 RBX: 0000000020ffffff RCX: ffff88811ceea800
RDX: 0000000000000000 RSI: 0000000020ffffff RDI: 0000000021000000
RBP: ffffc90000de7c50 R08: ffffffff81b06861 R09: ffffffff84fc5753
R10: 0000000000000003 R11: ffff88811ceea800 R12: ffffc90000de7ba8
R13: dffffc0000000000 R14: 0000000020ffd000 R15: 0000000021000000
FS: 0000555557204300(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000114 CR3: 000000011f3b7000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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 bug is already fixed, 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 change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

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

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

syzbot

unread,
Jun 11, 2023, 1:28:46 PM6/11/23
to syzkaller-a...@googlegroups.com
Bug presence analysis results: the bug reproduces only on Android 6.1.

syzbot has run the reproducer on other relevant kernel trees and got
the following results:

android14-6.1 (commit 7641ff0a300a) on 2023/06/11:
kernel BUG in mmap_region
Report: https://syzkaller.appspot.com/x/report.txt?x=11d9d48b280000

lts (commit b1644a0031cf) on 2023/06/11:
Didn't crash.

upstream (commit 022ce8862dff) on 2023/06/11:
Didn't crash.

More details can be found at:
https://syzkaller.appspot.com/bug?extid=af3fbbcc17d7f34395be

syzbot

unread,
Jun 11, 2023, 10:12:48 PM6/11/23
to syzkaller-a...@googlegroups.com
syzbot has bisected this issue to:

commit 2f5f352e6ab38f361d615b0ca691ccc69d094818
Author: Liam R. Howlett <Liam.H...@oracle.com>
Date: Thu May 18 14:55:44 2023 +0000

FROMGIT: BACKPORT: mm: avoid rewalk in mmap_region

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=12f20b1d280000
start commit: 7641ff0a300a ANDROID: mm: Avoid merging cma with others
git tree: android14-6.1
final oops: https://syzkaller.appspot.com/x/report.txt?x=11f20b1d280000
console output: https://syzkaller.appspot.com/x/log.txt?x=16f20b1d280000
Reported-by: syzbot+af3fbb...@syzkaller.appspotmail.com
Fixes: 2f5f352e6ab3 ("FROMGIT: BACKPORT: mm: avoid rewalk in mmap_region")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages