syzbot


WARNING in memtype_reserve

Status: fixed on 2020/07/17 17:58
Reported-by: syzbot+353be47c9ce21b68b7ed@syzkaller.appspotmail.com
Fix commit: a0e710a7def4 USB: usbfs: fix mmap dma mismatch
First crash: 1439d, last: 1430d
Cause bisection: introduced by (bisect log) :
commit 2bef9aed6f0e22391c8d4570749b1acc9bc3981e
Author: Jeremy Linton <jeremy.linton@arm.com>
Date: Mon May 4 20:13:48 2020 +0000

  usb: usbfs: correct kernel->user page attribute mismatch

Crash: WARNING in memtype_reserve (log)
Repro: C syz .config
  
Discussions (7)
Title Replies (including bot) Last reply
[PATCH AUTOSEL 5.6 001/606] hwmon: (da9052) Synchronize access with mfd 327 (327) 2020/06/10 13:44
[PATCH 5.4 000/147] 5.4.42-rc1 review 152 (152) 2020/05/19 16:29
[PATCH 5.6 000/194] 5.6.14-rc1 review 203 (203) 2020/05/19 14:44
[PATCH] USB: usbfs: fix mmap dma mismatch 5 (5) 2020/05/14 14:39
Re: WARNING in memtype_reserve 10 (10) 2020/05/14 11:22
WARNING in memtype_reserve 9 (11) 2020/05/14 10:44
Re: WARNING in memtype_reserve 1 (1) 2020/05/13 12:41
Last patch testing requests (2)
Created Duration User Patch Repo Result
2020/05/14 10:27 16m gregkh@linuxfoundation.org patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d5eeab8d OK
2020/05/14 03:55 16m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d5eeab8d OK

Sample crash report:
------------[ cut here ]------------
memtype_reserve failed: [mem 0xffffffffff000-0x003fefff], req write-back
WARNING: CPU: 0 PID: 7023 at arch/x86/mm/pat/memtype.c:589 memtype_reserve+0x69f/0x820 arch/x86/mm/pat/memtype.c:589
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 7023 Comm: syz-executor032 Not tainted 5.7.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x188/0x20d lib/dump_stack.c:118
 panic+0x2e3/0x75c kernel/panic.c:221
 __warn.cold+0x2f/0x35 kernel/panic.c:582
 report_bug+0x27b/0x2f0 lib/bug.c:195
 fixup_bug arch/x86/kernel/traps.c:175 [inline]
 fixup_bug arch/x86/kernel/traps.c:170 [inline]
 do_error_trap+0x12b/0x220 arch/x86/kernel/traps.c:267
 do_invalid_op+0x32/0x40 arch/x86/kernel/traps.c:286
 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027
RIP: 0010:memtype_reserve+0x69f/0x820 arch/x86/mm/pat/memtype.c:589
Code: 48 8b 2c ed c0 00 29 88 e8 ae ad 3e 00 48 8d 4b ff 49 89 e8 4c 89 e2 48 c7 c6 20 01 29 88 48 c7 c7 80 f9 28 88 e8 79 e8 0f 00 <0f> 0b 41 bf ea ff ff ff e9 03 fc ff ff 41 bf ea ff ff ff e9 f8 fb
RSP: 0018:ffffc900014777a0 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 00000000003ff000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815ce181 RDI: fffff5200028eee6
RBP: ffffffff8828ff40 R08: ffff888097816580 R09: ffffed1015cc66a9
R10: ffff8880ae633547 R11: ffffed1015cc66a8 R12: 000ffffffffff000
R13: 1ffff9200028eefa R14: dffffc0000000000 R15: 0000000000000000
 reserve_pfn_range+0x173/0x470 arch/x86/mm/pat/memtype.c:941
 track_pfn_remap+0x18b/0x280 arch/x86/mm/pat/memtype.c:1033
 remap_pfn_range+0x202/0xbf0 mm/memory.c:2130
 dma_direct_mmap+0x197/0x260 kernel/dma/direct.c:453
 dma_mmap_attrs+0xfe/0x150 kernel/dma/mapping.c:237
 usbdev_mmap+0x3ae/0x730 drivers/usb/core/devio.c:254
 call_mmap include/linux/fs.h:1912 [inline]
 mmap_region+0xafb/0x1540 mm/mmap.c:1772
 do_mmap+0x849/0x1160 mm/mmap.c:1545
 do_mmap_pgoff include/linux/mm.h:2553 [inline]
 vm_mmap_pgoff+0x197/0x200 mm/util.c:506
 ksys_mmap_pgoff+0x457/0x5b0 mm/mmap.c:1595
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x443e79
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 7b d8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffd1c367b88 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443e79
RDX: 0000000000000000 RSI: 0000000000400000 RDI: 0000000020000000
RBP: 00000000006ce018 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000011 R11: 0000000000000246 R12: 0000000000401b80
R13: 0000000000401c10 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (600):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/09 06:34 upstream d5eeab8d7e26 e97b06d3 .config console log report syz C ci-upstream-kasan-gce
2020/05/09 06:12 upstream d5eeab8d7e26 e97b06d3 .config console log report syz C ci-upstream-kasan-gce
2020/05/09 05:52 upstream d5eeab8d7e26 e97b06d3 .config console log report syz C ci-upstream-kasan-gce
2020/05/09 05:32 upstream d5eeab8d7e26 e97b06d3 .config console log report syz C ci-upstream-kasan-gce
2020/05/09 03:31 upstream d5eeab8d7e26 e97b06d3 .config console log report syz C ci-upstream-kasan-gce
2020/05/09 03:30 upstream d5eeab8d7e26 e97b06d3 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/05/09 03:26 upstream d5eeab8d7e26 e97b06d3 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/05/09 03:22 upstream d5eeab8d7e26 e97b06d3 .config console log report syz C ci-upstream-kasan-gce-root
2020/05/09 06:11 upstream d5eeab8d7e26 e97b06d3 .config console log report syz C ci-upstream-kasan-gce-386
2020/05/09 05:50 upstream d5eeab8d7e26 e97b06d3 .config console log report syz C ci-upstream-kasan-gce-386
2020/05/09 05:30 upstream d5eeab8d7e26 e97b06d3 .config console log report syz C ci-upstream-kasan-gce-386
2020/05/09 05:10 upstream d5eeab8d7e26 e97b06d3 .config console log report syz C ci-upstream-kasan-gce-386
2020/05/09 03:09 upstream d5eeab8d7e26 e97b06d3 .config console log report syz C ci-upstream-kasan-gce-386
2020/05/17 21:53 upstream 5a9ffb954a39 37bccd4e .config console log report ci-upstream-kasan-gce-smack-root
2020/05/17 19:20 upstream 5a9ffb954a39 37bccd4e .config console log report ci-upstream-kasan-gce-selinux-root
2020/05/17 14:57 upstream 5a9ffb954a39 37bccd4e .config console log report ci-upstream-kasan-gce-selinux-root
2020/05/17 13:33 upstream 5a9ffb954a39 37bccd4e .config console log report ci-upstream-kasan-gce-smack-root
2020/05/17 10:11 upstream 3d1c1e5931ce 37bccd4e .config console log report ci-upstream-kasan-gce-selinux-root
2020/05/17 09:25 upstream 3d1c1e5931ce 37bccd4e .config console log report ci-upstream-kasan-gce-smack-root
2020/05/17 06:56 upstream 3d1c1e5931ce 37bccd4e .config console log report ci-upstream-kasan-gce-root
2020/05/16 23:52 upstream 3d1c1e5931ce 37bccd4e .config console log report ci-upstream-kasan-gce
2020/05/16 21:50 upstream 12bf0b632ed0 37bccd4e .config console log report ci-upstream-kasan-gce-root
2020/05/16 20:14 upstream 12bf0b632ed0 37bccd4e .config console log report ci-upstream-kasan-gce-selinux-root
2020/05/16 18:20 upstream 12bf0b632ed0 37bccd4e .config console log report ci-upstream-kasan-gce
2020/05/16 18:03 upstream 12bf0b632ed0 37bccd4e .config console log report ci-upstream-kasan-gce
2020/05/16 13:52 upstream 12bf0b632ed0 37bccd4e .config console log report ci-upstream-kasan-gce-root
2020/05/16 13:24 upstream 12bf0b632ed0 37bccd4e .config console log report ci-upstream-kasan-gce-selinux-root
2020/05/16 08:01 upstream 12bf0b632ed0 37bccd4e .config console log report ci-upstream-kasan-gce
2020/05/16 06:29 upstream 12bf0b632ed0 37bccd4e .config console log report ci-upstream-kasan-gce
2020/05/16 06:13 upstream 12bf0b632ed0 37bccd4e .config console log report ci-upstream-kasan-gce-selinux-root
2020/05/15 22:11 upstream 1ae7efb38854 d7f9fffa .config console log report ci-upstream-kasan-gce-selinux-root
2020/05/15 20:05 upstream 1ae7efb38854 d7f9fffa .config console log report ci-upstream-kasan-gce
2020/05/15 18:58 upstream 1ae7efb38854 d7f9fffa .config console log report ci-upstream-kasan-gce
2020/05/15 17:21 upstream 1ae7efb38854 d7f9fffa .config console log report ci-upstream-kasan-gce-root
2020/05/15 11:28 upstream 1ae7efb38854 2d572622 .config console log report ci-upstream-kasan-gce
2020/05/15 10:27 upstream 1ae7efb38854 2d572622 .config console log report ci-qemu-upstream
2020/05/15 06:28 upstream 8c1684bb81f1 2d572622 .config console log report ci-upstream-kasan-gce-smack-root
2020/05/15 03:38 upstream 8c1684bb81f1 2d572622 .config console log report ci-upstream-kasan-gce-smack-root
2020/05/15 00:00 upstream 8c1684bb81f1 2d572622 .config console log report ci-upstream-kasan-gce-selinux-root
2020/05/14 23:51 upstream 8c1684bb81f1 2d572622 .config console log report ci-upstream-kasan-gce-root
2020/05/14 22:22 upstream 8c1684bb81f1 2d572622 .config console log report ci-upstream-kasan-gce
2020/05/14 15:05 upstream 24085f70a6e1 2d572622 .config console log report ci-upstream-kasan-gce
2020/05/14 14:57 upstream 24085f70a6e1 2d572622 .config console log report ci-upstream-kasan-gce-smack-root
2020/05/14 04:05 upstream 24085f70a6e1 a885920d .config console log report ci-upstream-kasan-gce-selinux-root
2020/05/14 02:09 upstream 24085f70a6e1 a885920d .config console log report ci-upstream-kasan-gce-root
2020/05/14 01:56 upstream 24085f70a6e1 a885920d .config console log report ci-upstream-kasan-gce-selinux-root
2020/05/13 18:12 upstream 24085f70a6e1 9a6d42fb .config console log report ci-upstream-kasan-gce-root
2020/05/08 23:36 upstream d5eeab8d7e26 e97b06d3 .config console log report ci-upstream-kasan-gce-selinux-root
2020/05/17 07:57 upstream 3d1c1e5931ce 37bccd4e .config console log report ci-upstream-kasan-gce-386
2020/05/17 01:15 upstream 3d1c1e5931ce 37bccd4e .config console log report ci-upstream-kasan-gce-386
2020/05/16 19:28 upstream 12bf0b632ed0 37bccd4e .config console log report ci-upstream-kasan-gce-386
2020/05/16 18:20 upstream 12bf0b632ed0 37bccd4e .config console log report ci-upstream-kasan-gce-386
2020/05/16 10:14 upstream 12bf0b632ed0 37bccd4e .config console log report ci-upstream-kasan-gce-386
2020/05/15 22:13 upstream 1ae7efb38854 d7f9fffa .config console log report ci-upstream-kasan-gce-386
2020/05/15 21:05 upstream 1ae7efb38854 d7f9fffa .config console log report ci-upstream-kasan-gce-386
2020/05/15 12:04 upstream 1ae7efb38854 2d572622 .config console log report ci-upstream-kasan-gce-386
2020/05/14 17:27 upstream 24085f70a6e1 2d572622 .config console log report ci-upstream-kasan-gce-386
2020/05/14 15:12 upstream 24085f70a6e1 2d572622 .config console log report ci-upstream-kasan-gce-386
2020/05/14 14:49 upstream 24085f70a6e1 2d572622 .config console log report ci-upstream-kasan-gce-386
2020/05/13 18:27 upstream 24085f70a6e1 9a6d42fb .config console log report ci-upstream-kasan-gce-386
2020/05/13 13:16 upstream 24085f70a6e1 9a6d42fb .config console log report ci-upstream-kasan-gce-386
* Struck through repros no longer work on HEAD.