2021-09-17 13:37:03

by syzbot

[permalink] [raw]
Subject: [syzbot] kernel BUG in vmf_insert_pfn_prot

Hello,

syzbot found the following issue on:

HEAD commit: 9004fd387338 Add linux-next specific files for 20210917
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=17ecf0ad300000
kernel config: https://syzkaller.appspot.com/x/.config?x=45d5ac72f31f29f3
dashboard link: https://syzkaller.appspot.com/bug?extid=2d4f8693f438d2bd4bdb
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]

------------[ cut here ]------------
kernel BUG at mm/memory.c:2103!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8279 Comm: syz-executor.0 Not tainted 5.15.0-rc1-next-20210917-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:vmf_insert_pfn_prot+0x248/0x450 mm/memory.c:2103
Code: 0f 0b e8 6b d0 ca ff 4d 89 f7 bf 20 00 00 00 41 83 e7 28 4c 89 fe e8 b7 d5 ca ff 49 83 ff 20 0f 85 a5 fe ff ff e8 48 d0 ca ff <0f> 0b 49 be ff ff ff ff ff ff 0f 00 e8 37 d0 ca ff 4d 21 ee 4c 89
RSP: 0000:ffffc90005f47bd0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 1ffff92000be8f7c RCX: 0000000000000000
RDX: ffff888050adb900 RSI: ffffffff81ab3e18 RDI: 0000000000000003
RBP: ffff88807e3bcc60 R08: 0000000000000020 R09: ffffc90005f47bb7
R10: ffffffff81ab3e09 R11: 1ffffffff1ebb3fc R12: 000000002001d000
R13: 0000000000145dc3 R14: 0000000008140476 R15: 0000000000000020
FS: 0000555555f1e400(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005608abbf4250 CR3: 000000006e072000 CR4: 00000000001506f0
Call Trace:
drm_gem_shmem_fault+0x1e3/0x290 drivers/gpu/drm/drm_gem_shmem_helper.c:564
__do_fault+0x10d/0x4d0 mm/memory.c:3848
do_cow_fault mm/memory.c:4184 [inline]
do_fault mm/memory.c:4285 [inline]
handle_pte_fault mm/memory.c:4541 [inline]
__handle_mm_fault+0x370e/0x5120 mm/memory.c:4676
handle_mm_fault+0x1c8/0x790 mm/memory.c:4774
do_user_addr_fault+0x48b/0x11c0 arch/x86/mm/fault.c:1390
handle_page_fault arch/x86/mm/fault.c:1475 [inline]
exc_page_fault+0x9e/0x180 arch/x86/mm/fault.c:1531
asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:568
RIP: 0033:0x7f1096c04d5a
Code: 30 48 8b 34 24 48 85 f6 74 17 8b 44 24 18 0f c8 89 c0 48 89 44 24 18 48 83 fe 01 0f 85 a1 01 00 00 48 8b 44 24 10 8b 74 24 18 <89> 30 e9 d2 fc ff ff 48 8b 44 24 10 8b 10 48 8b 04 24 48 85 c0 0f
RSP: 002b:00007ffd0b939970 EFLAGS: 00010246
RAX: 000000002001d000 RBX: 00007f109716c000 RCX: 0000000000000000
RDX: 182c4ff2a4394aee RSI: 0000000000000001 RDI: 0000555555f1e2f0
RBP: 00007ffd0b939a68 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000004 R11: 00000000e900f6d2 R12: 00000000001760c0
R13: 00000000000003e8 R14: 00007f1096d67f80 R15: 0000000000176064
Modules linked in:
---[ end trace 1a78047d43092735 ]---
RIP: 0010:vmf_insert_pfn_prot+0x248/0x450 mm/memory.c:2103
Code: 0f 0b e8 6b d0 ca ff 4d 89 f7 bf 20 00 00 00 41 83 e7 28 4c 89 fe e8 b7 d5 ca ff 49 83 ff 20 0f 85 a5 fe ff ff e8 48 d0 ca ff <0f> 0b 49 be ff ff ff ff ff ff 0f 00 e8 37 d0 ca ff 4d 21 ee 4c 89
RSP: 0000:ffffc90005f47bd0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 1ffff92000be8f7c RCX: 0000000000000000
RDX: ffff888050adb900 RSI: ffffffff81ab3e18 RDI: 0000000000000003
RBP: ffff88807e3bcc60 R08: 0000000000000020 R09: ffffc90005f47bb7
R10: ffffffff81ab3e09 R11: 1ffffffff1ebb3fc R12: 000000002001d000
R13: 0000000000145dc3 R14: 0000000008140476 R15: 0000000000000020
FS: 0000555555f1e400(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffb730a0718 CR3: 000000006e072000 CR4: 00000000001506e0


---
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.


2021-09-19 08:08:31

by syzbot

[permalink] [raw]
Subject: Re: [syzbot] kernel BUG in vmf_insert_pfn_prot

syzbot has found a reproducer for the following issue on:

HEAD commit: 9004fd387338 Add linux-next specific files for 20210917
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=11e1691d300000
kernel config: https://syzkaller.appspot.com/x/.config?x=45d5ac72f31f29f3
dashboard link: https://syzkaller.appspot.com/bug?extid=2d4f8693f438d2bd4bdb
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=13ad5527300000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13beef77300000

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

------------[ cut here ]------------
kernel BUG at mm/memory.c:2103!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 6537 Comm: syz-executor894 Not tainted 5.15.0-rc1-next-20210917-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:vmf_insert_pfn_prot+0x248/0x450 mm/memory.c:2103
Code: 0f 0b e8 6b d0 ca ff 4d 89 f7 bf 20 00 00 00 41 83 e7 28 4c 89 fe e8 b7 d5 ca ff 49 83 ff 20 0f 85 a5 fe ff ff e8 48 d0 ca ff <0f> 0b 49 be ff ff ff ff ff ff 0f 00 e8 37 d0 ca ff 4d 21 ee 4c 89
RSP: 0000:ffffc90002c5fbd0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 1ffff9200058bf7c RCX: 0000000000000000
RDX: ffff888014d81c80 RSI: ffffffff81ab3e18 RDI: 0000000000000003
RBP: ffff88806ec18318 R08: 0000000000000020 R09: ffffc90002c5fbb7
R10: ffffffff81ab3e09 R11: 0000000000000000 R12: 0000000020000000
R13: 000000000001a305 R14: 0000000008140476 R15: 0000000000000020
FS: 00007fd624da5700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000600 CR3: 000000006e41e000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
drm_gem_shmem_fault+0x1e3/0x290 drivers/gpu/drm/drm_gem_shmem_helper.c:564
__do_fault+0x10d/0x4d0 mm/memory.c:3848
do_cow_fault mm/memory.c:4184 [inline]
do_fault mm/memory.c:4285 [inline]
handle_pte_fault mm/memory.c:4541 [inline]
__handle_mm_fault+0x370e/0x5120 mm/memory.c:4676
handle_mm_fault+0x1c8/0x790 mm/memory.c:4774
do_user_addr_fault+0x48b/0x11c0 arch/x86/mm/fault.c:1390
handle_page_fault arch/x86/mm/fault.c:1475 [inline]
exc_page_fault+0x9e/0x180 arch/x86/mm/fault.c:1531
asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:568
RIP: 0033:0x7fd624db0238
Code: c0 75 63 48 8d 75 0c b9 40 42 0f 00 ba 81 00 00 00 c7 45 0c 01 00 00 00 bf ca 00 00 00 31 c0 e8 0e 2a 04 00 eb 85 0f 1f 40 00 <4c> 89 24 25 00 06 00 20 45 31 c0 31 c9 31 c0 c6 04 25 08 06 00 20
RSP: 002b:00007fd624da5320 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 00007fd624e7b3e8 RCX: 00007fd624df2c59
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fd624e7b3e8
RBP: 00007fd624e7b3e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 3162662f7665642f
R13: 00007ffe82f363ff R14: 00007fd624da5400 R15: 0000000000022000
Modules linked in:
---[ end trace 0e8bfa618299b282 ]---
RIP: 0010:vmf_insert_pfn_prot+0x248/0x450 mm/memory.c:2103
Code: 0f 0b e8 6b d0 ca ff 4d 89 f7 bf 20 00 00 00 41 83 e7 28 4c 89 fe e8 b7 d5 ca ff 49 83 ff 20 0f 85 a5 fe ff ff e8 48 d0 ca ff <0f> 0b 49 be ff ff ff ff ff ff 0f 00 e8 37 d0 ca ff 4d 21 ee 4c 89
RSP: 0000:ffffc90002c5fbd0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 1ffff9200058bf7c RCX: 0000000000000000
RDX: ffff888014d81c80 RSI: ffffffff81ab3e18 RDI: 0000000000000003
RBP: ffff88806ec18318 R08: 0000000000000020 R09: ffffc90002c5fbb7
R10: ffffffff81ab3e09 R11: 0000000000000000 R12: 0000000020000000
R13: 000000000001a305 R14: 0000000008140476 R15: 0000000000000020
FS: 00007fd624da5700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f27acc516c0 CR3: 000000006e41e000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

2021-09-19 11:21:58

by syzbot

[permalink] [raw]
Subject: Re: [syzbot] kernel BUG in vmf_insert_pfn_prot

syzbot has bisected this issue to:

commit 8b93d1d7dbd578fd296e70008b29c0f62d09d7cb
Author: Daniel Vetter <[email protected]>
Date: Thu Aug 12 13:14:10 2021 +0000

drm/shmem-helper: Switch to vmf_insert_pfn

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1277054f300000
start commit: 9004fd387338 Add linux-next specific files for 20210917
git tree: linux-next
final oops: https://syzkaller.appspot.com/x/report.txt?x=1177054f300000
console output: https://syzkaller.appspot.com/x/log.txt?x=1677054f300000
kernel config: https://syzkaller.appspot.com/x/.config?x=45d5ac72f31f29f3
dashboard link: https://syzkaller.appspot.com/bug?extid=2d4f8693f438d2bd4bdb
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13ad5527300000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13beef77300000

Reported-by: [email protected]
Fixes: 8b93d1d7dbd5 ("drm/shmem-helper: Switch to vmf_insert_pfn")

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

2023-06-13 19:43:17

by syzbot

[permalink] [raw]
Subject: Re: [syzbot] kernel BUG in vmf_insert_pfn_prot

syzbot suspects this issue was fixed by commit:

commit a5b44c4adb1699661d22e5152fb26885f30a2e4c
Author: Thomas Zimmermann <[email protected]>
Date: Mon Mar 20 15:07:44 2023 +0000

drm/fbdev-generic: Always use shadow buffering

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1025ee07280000
start commit: 0326074ff465 Merge tag 'net-next-6.1' of git://git.kernel...
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=d323d85b1f8a4ed7
dashboard link: https://syzkaller.appspot.com/bug?extid=2d4f8693f438d2bd4bdb
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14fd1182880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17567514880000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: drm/fbdev-generic: Always use shadow buffering

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

2023-06-14 07:44:57

by Dmitry Vyukov

[permalink] [raw]
Subject: Re: [syzbot] kernel BUG in vmf_insert_pfn_prot

On Tue, 13 Jun 2023 at 21:23, syzbot
<[email protected]> wrote:
>
> syzbot suspects this issue was fixed by commit:
>
> commit a5b44c4adb1699661d22e5152fb26885f30a2e4c
> Author: Thomas Zimmermann <[email protected]>
> Date: Mon Mar 20 15:07:44 2023 +0000
>
> drm/fbdev-generic: Always use shadow buffering
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1025ee07280000
> start commit: 0326074ff465 Merge tag 'net-next-6.1' of git://git.kernel...
> git tree: upstream
> kernel config: https://syzkaller.appspot.com/x/.config?x=d323d85b1f8a4ed7
> dashboard link: https://syzkaller.appspot.com/bug?extid=2d4f8693f438d2bd4bdb
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14fd1182880000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17567514880000
>
> If the result looks correct, please mark the issue as fixed by replying with:
>
> #syz fix: drm/fbdev-generic: Always use shadow buffering
>
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Looks reasonable:

#syz fix: drm/fbdev-generic: Always use shadow buffering