2022-08-08 08:17:38

by syzbot

[permalink] [raw]
Subject: [syzbot] WARNING in find_vma

Hello,

syzbot found the following issue on:

HEAD commit: ca688bff68bc Add linux-next specific files for 20220808
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=10e83871080000
kernel config: https://syzkaller.appspot.com/x/.config?x=4c20e006003cdecb
dashboard link: https://syzkaller.appspot.com/bug?extid=a7b60a176ec13cafb793
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

WARNING: CPU: 0 PID: 6818 at include/linux/mmap_lock.h:155 mmap_assert_locked include/linux/mmap_lock.h:155 [inline]
WARNING: CPU: 0 PID: 6818 at include/linux/mmap_lock.h:155 find_vma+0xf8/0x270 mm/mmap.c:2255
Modules linked in:
CPU: 1 PID: 6818 Comm: syz-executor.4 Not tainted 5.19.0-next-20220808-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
RIP: 0010:mmap_assert_locked include/linux/mmap_lock.h:155 [inline]
RIP: 0010:find_vma+0xf8/0x270 mm/mmap.c:2255
Code: 49 8d bc 24 28 01 00 00 be ff ff ff ff e8 40 2e c8 07 31 ff 89 c3 89 c6 e8 85 e2 c4 ff 85 db 0f 85 61 ff ff ff e8 b8 e5 c4 ff <0f> 0b e9 55 ff ff ff e8 ac e5 c4 ff 4c 89 e7 e8 54 38 fb ff 0f 0b
RSP: 0018:ffffc9000cac7530 EFLAGS: 00010216
RAX: 0000000000001fcd RBX: 0000000000000000 RCX: ffffc90003991000
RDX: 0000000000040000 RSI: ffffffff81b72058 RDI: 0000000000000005
RBP: 0000000020ffc000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff888020bb6900
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000006
FS: 00007f8a9c5d8700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002019c000 CR3: 000000001de0c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
vma_lookup include/linux/mm.h:2743 [inline]
binder_alloc_get_vma drivers/android/binder_alloc.c:340 [inline]
binder_alloc_new_buf_locked drivers/android/binder_alloc.c:405 [inline]
binder_alloc_new_buf+0xd6/0x18b0 drivers/android/binder_alloc.c:590
binder_transaction+0x242e/0x9a80 drivers/android/binder.c:3187
binder_thread_write+0x8a9/0x3220 drivers/android/binder.c:3963
binder_ioctl_write_read drivers/android/binder.c:5024 [inline]
binder_ioctl+0x3470/0x6d00 drivers/android/binder.c:5311
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl fs/ioctl.c:856 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f8a9b489279
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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f8a9c5d8168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f8a9b59bf80 RCX: 00007f8a9b489279
RDX: 0000000020000680 RSI: 00000000c0306201 RDI: 0000000000000004
RBP: 00007f8a9b4e3189 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffde1b812ff R14: 00007f8a9c5d8300 R15: 0000000000022000
</TASK>


---
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 [email protected].

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


2022-08-08 19:46:15

by syzbot

[permalink] [raw]
Subject: Re: [syzbot] WARNING in find_vma

syzbot has found a reproducer for the following issue on:

HEAD commit: ca688bff68bc Add linux-next specific files for 20220808
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=14807dfa080000
kernel config: https://syzkaller.appspot.com/x/.config?x=4c20e006003cdecb
dashboard link: https://syzkaller.appspot.com/bug?extid=a7b60a176ec13cafb793
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12999232080000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15452c12080000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

binder: 7796:7797 ioctl c0306201 20001480 returned -14
------------[ cut here ]------------
WARNING: CPU: 1 PID: 7797 at include/linux/mmap_lock.h:155 mmap_assert_locked include/linux/mmap_lock.h:155 [inline]
WARNING: CPU: 1 PID: 7797 at include/linux/mmap_lock.h:155 find_vma+0xf8/0x270 mm/mmap.c:2255
Modules linked in:
CPU: 1 PID: 7797 Comm: syz-executor269 Not tainted 5.19.0-next-20220808-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
RIP: 0010:mmap_assert_locked include/linux/mmap_lock.h:155 [inline]
RIP: 0010:find_vma+0xf8/0x270 mm/mmap.c:2255
Code: 49 8d bc 24 28 01 00 00 be ff ff ff ff e8 40 2e c8 07 31 ff 89 c3 89 c6 e8 85 e2 c4 ff 85 db 0f 85 61 ff ff ff e8 b8 e5 c4 ff <0f> 0b e9 55 ff ff ff e8 ac e5 c4 ff 4c 89 e7 e8 54 38 fb ff 0f 0b
RSP: 0018:ffffc9000cee7530 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88807c278000 RSI: ffffffff81b72058 RDI: 0000000000000005
RBP: 0000000020ffc000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88807dda3100
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
FS: 00007f5fdf1fb700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000007d391000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
vma_lookup include/linux/mm.h:2743 [inline]
binder_alloc_get_vma drivers/android/binder_alloc.c:340 [inline]
binder_alloc_new_buf_locked drivers/android/binder_alloc.c:405 [inline]
binder_alloc_new_buf+0xd6/0x18b0 drivers/android/binder_alloc.c:590
binder_transaction+0x242e/0x9a80 drivers/android/binder.c:3187
binder_thread_write+0x8a9/0x3220 drivers/android/binder.c:3963
binder_ioctl_write_read drivers/android/binder.c:5024 [inline]
binder_ioctl+0x3470/0x6d00 drivers/android/binder.c:5311
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl fs/ioctl.c:856 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f5fdf24ae19
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 a1 15 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:00007f5fdf1fb318 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f5fdf2d34e8 RCX: 00007f5fdf24ae19
RDX: 0000000020000680 RSI: 00000000c0306201 RDI: 0000000000000003
RBP: 00007f5fdf2d34e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5fdf2a02c0
R13: 00007ffc598955af R14: 00007f5fdf1fb400 R15: 0000000000022000
</TASK>

2022-08-08 22:35:09

by Andrew Morton

[permalink] [raw]
Subject: Re: [syzbot] WARNING in find_vma

(cc people from the thread "Binder regression caused by commit a43cfc87caaf")

On Mon, 08 Aug 2022 12:33:21 -0700 syzbot <[email protected]> wrote:

> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: ca688bff68bc Add linux-next specific files for 20220808
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=14807dfa080000
> kernel config: https://syzkaller.appspot.com/x/.config?x=4c20e006003cdecb
> dashboard link: https://syzkaller.appspot.com/bug?extid=a7b60a176ec13cafb793
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12999232080000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15452c12080000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: [email protected]
>
> binder: 7796:7797 ioctl c0306201 20001480 returned -14
> ------------[ cut here ]------------
> WARNING: CPU: 1 PID: 7797 at include/linux/mmap_lock.h:155 mmap_assert_locked include/linux/mmap_lock.h:155 [inline]
> WARNING: CPU: 1 PID: 7797 at include/linux/mmap_lock.h:155 find_vma+0xf8/0x270 mm/mmap.c:2255
> Modules linked in:
> CPU: 1 PID: 7797 Comm: syz-executor269 Not tainted 5.19.0-next-20220808-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
> RIP: 0010:mmap_assert_locked include/linux/mmap_lock.h:155 [inline]
> RIP: 0010:find_vma+0xf8/0x270 mm/mmap.c:2255
> Code: 49 8d bc 24 28 01 00 00 be ff ff ff ff e8 40 2e c8 07 31 ff 89 c3 89 c6 e8 85 e2 c4 ff 85 db 0f 85 61 ff ff ff e8 b8 e5 c4 ff <0f> 0b e9 55 ff ff ff e8 ac e5 c4 ff 4c 89 e7 e8 54 38 fb ff 0f 0b
> RSP: 0018:ffffc9000cee7530 EFLAGS: 00010293
> RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
> RDX: ffff88807c278000 RSI: ffffffff81b72058 RDI: 0000000000000005
> RBP: 0000000020ffc000 R08: 0000000000000005 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000000 R12: ffff88807dda3100
> R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
> FS: 00007f5fdf1fb700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 0000000000000000 CR3: 000000007d391000 CR4: 00000000003506f0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> <TASK>
> vma_lookup include/linux/mm.h:2743 [inline]
> binder_alloc_get_vma drivers/android/binder_alloc.c:340 [inline]
> binder_alloc_new_buf_locked drivers/android/binder_alloc.c:405 [inline]
> binder_alloc_new_buf+0xd6/0x18b0 drivers/android/binder_alloc.c:590
> binder_transaction+0x242e/0x9a80 drivers/android/binder.c:3187
> binder_thread_write+0x8a9/0x3220 drivers/android/binder.c:3963
> binder_ioctl_write_read drivers/android/binder.c:5024 [inline]
> binder_ioctl+0x3470/0x6d00 drivers/android/binder.c:5311
> vfs_ioctl fs/ioctl.c:51 [inline]
> __do_sys_ioctl fs/ioctl.c:870 [inline]
> __se_sys_ioctl fs/ioctl.c:856 [inline]
> __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856
> do_syscall_x64 arch/x86/entry/common.c:50 [inline]
> do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
> entry_SYSCALL_64_after_hwframe+0x63/0xcd
> RIP: 0033:0x7f5fdf24ae19
> Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 a1 15 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:00007f5fdf1fb318 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
> RAX: ffffffffffffffda RBX: 00007f5fdf2d34e8 RCX: 00007f5fdf24ae19
> RDX: 0000000020000680 RSI: 00000000c0306201 RDI: 0000000000000003
> RBP: 00007f5fdf2d34e0 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5fdf2a02c0
> R13: 00007ffc598955af R14: 00007f5fdf1fb400 R15: 0000000000022000
> </TASK>

2022-08-09 16:23:22

by Liam R. Howlett

[permalink] [raw]
Subject: Re: [syzbot] WARNING in find_vma

* Andrew Morton <[email protected]> [220808 18:32]:
> (cc people from the thread "Binder regression caused by commit a43cfc87caaf")
>
> On Mon, 08 Aug 2022 12:33:21 -0700 syzbot <[email protected]> wrote:
>
> > syzbot has found a reproducer for the following issue on:
> >
> > HEAD commit: ca688bff68bc Add linux-next specific files for 20220808
> > git tree: linux-next
> > console output: https://syzkaller.appspot.com/x/log.txt?x=14807dfa080000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=4c20e006003cdecb
> > dashboard link: https://syzkaller.appspot.com/bug?extid=a7b60a176ec13cafb793
> > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12999232080000
> > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15452c12080000
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: [email protected]
> >
> > binder: 7796:7797 ioctl c0306201 20001480 returned -14
> > ------------[ cut here ]------------
> > WARNING: CPU: 1 PID: 7797 at include/linux/mmap_lock.h:155 mmap_assert_locked include/linux/mmap_lock.h:155 [inline]
> > WARNING: CPU: 1 PID: 7797 at include/linux/mmap_lock.h:155 find_vma+0xf8/0x270 mm/mmap.c:2255
> > Modules linked in:
> > CPU: 1 PID: 7797 Comm: syz-executor269 Not tainted 5.19.0-next-20220808-syzkaller #0
> > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
> > RIP: 0010:mmap_assert_locked include/linux/mmap_lock.h:155 [inline]
> > RIP: 0010:find_vma+0xf8/0x270 mm/mmap.c:2255
> > Code: 49 8d bc 24 28 01 00 00 be ff ff ff ff e8 40 2e c8 07 31 ff 89 c3 89 c6 e8 85 e2 c4 ff 85 db 0f 85 61 ff ff ff e8 b8 e5 c4 ff <0f> 0b e9 55 ff ff ff e8 ac e5 c4 ff 4c 89 e7 e8 54 38 fb ff 0f 0b
> > RSP: 0018:ffffc9000cee7530 EFLAGS: 00010293
> > RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
> > RDX: ffff88807c278000 RSI: ffffffff81b72058 RDI: 0000000000000005
> > RBP: 0000000020ffc000 R08: 0000000000000005 R09: 0000000000000000
> > R10: 0000000000000000 R11: 0000000000000000 R12: ffff88807dda3100
> > R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
> > FS: 00007f5fdf1fb700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
> > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > CR2: 0000000000000000 CR3: 000000007d391000 CR4: 00000000003506f0
> > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> > Call Trace:
> > <TASK>
> > vma_lookup include/linux/mm.h:2743 [inline]
> > binder_alloc_get_vma drivers/android/binder_alloc.c:340 [inline]
> > binder_alloc_new_buf_locked drivers/android/binder_alloc.c:405 [inline]
> > binder_alloc_new_buf+0xd6/0x18b0 drivers/android/binder_alloc.c:590
> > binder_transaction+0x242e/0x9a80 drivers/android/binder.c:3187
> > binder_thread_write+0x8a9/0x3220 drivers/android/binder.c:3963
> > binder_ioctl_write_read drivers/android/binder.c:5024 [inline]
> > binder_ioctl+0x3470/0x6d00 drivers/android/binder.c:5311
> > vfs_ioctl fs/ioctl.c:51 [inline]
> > __do_sys_ioctl fs/ioctl.c:870 [inline]
> > __se_sys_ioctl fs/ioctl.c:856 [inline]
> > __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856
> > do_syscall_x64 arch/x86/entry/common.c:50 [inline]
> > do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
> > entry_SYSCALL_64_after_hwframe+0x63/0xcd
...

There are actually two call paths that will cause this BUG_ON to
trigger. The patch I've sent fixes both [1]. Besides the above
binder_alloc_new_buf_locked() call path, there is one that would be
triggered when reading the debugfs binder files. I'm guessing there
aren't test that cover the debugfs files.

[1] https://lore.kernel.org/linux-mm/[email protected]/

Thanks,
Liam

2022-08-10 14:09:54

by syzbot

[permalink] [raw]
Subject: Re: [syzbot] WARNING in find_vma

syzbot has bisected this issue to:

commit fd0016c6bd4f6287c5c5f98b6350033ebb3c9753
Author: Miguel Ojeda <[email protected]>
Date: Sun Dec 5 18:00:43 2021 +0000

scripts: decode_stacktrace: demangle Rust symbols

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10fb7021080000
start commit: ca688bff68bc Add linux-next specific files for 20220808
git tree: linux-next
final oops: https://syzkaller.appspot.com/x/report.txt?x=12fb7021080000
console output: https://syzkaller.appspot.com/x/log.txt?x=14fb7021080000
kernel config: https://syzkaller.appspot.com/x/.config?x=4c20e006003cdecb
dashboard link: https://syzkaller.appspot.com/bug?extid=a7b60a176ec13cafb793
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12999232080000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15452c12080000

Reported-by: [email protected]
Fixes: fd0016c6bd4f ("scripts: decode_stacktrace: demangle Rust symbols")

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

2022-08-10 14:35:20

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [syzbot] WARNING in find_vma

On Wed, Aug 10, 2022 at 06:44:08AM -0700, syzbot wrote:
> syzbot has bisected this issue to:
>
> commit fd0016c6bd4f6287c5c5f98b6350033ebb3c9753
> Author: Miguel Ojeda <[email protected]>
> Date: Sun Dec 5 18:00:43 2021 +0000
>
> scripts: decode_stacktrace: demangle Rust symbols

This bisection has gone astray; those implicated in this commit can
ignore this report. Liam has already posted a fix for the bug.