syzbot


WARNING in get_pat_info

Status: upstream: reported C repro on 2024/09/08 00:06
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+16b1da89309a06cd0e3a@syzkaller.appspotmail.com
First crash: 78d, last: 10d
Cause bisection: introduced by (bisect log) :
commit 79a61cc3fc0466ad2b7b89618a6157785f0293b3
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Thu Sep 12 00:11:23 2024 +0000

  mm: avoid leaving partial pfn mappings around in error case

Crash: WARNING in get_pat_info (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [kernel?] WARNING in get_pat_info 1 (4) 2024/11/11 09:45

Sample crash report:
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffccfb961e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fc6265e02e9
RDX: 0000000000000000 RSI: 0000000000003000 RDI: 0000000020ff6000
RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000013 R11: 0000000000000246 R12: 00007fc626624153
R13: 00007ffccfb96260 R14: 00007fc62662a29c R15: 00007fc626624032
 </TASK>
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5831 at arch/x86/mm/pat/memtype.c:983 get_pat_info+0x1eb/0x3f0 arch/x86/mm/pat/memtype.c:983
Modules linked in:
CPU: 0 UID: 0 PID: 5831 Comm: syz-executor181 Not tainted 6.12.0-rc6-syzkaller-00099-g7758b206117d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:get_pat_info+0x1eb/0x3f0 arch/x86/mm/pat/memtype.c:983
Code: 00 00 00 48 89 de e8 c4 e0 50 00 48 83 fb 20 75 13 48 83 7c 24 10 00 0f 84 5e 01 00 00 e8 cd db 50 00 eb 09 e8 c6 db 50 00 90 <0f> 0b 90 b8 ea ff ff ff 48 c7 44 24 20 0e 36 e0 45 48 b9 00 00 00
RSP: 0018:ffffc90003e37020 EFLAGS: 00010293
RAX: ffffffff8143fe3a RBX: 0000000000000000 RCX: ffff88807c4d9e00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000020
RBP: ffffc90003e37110 R08: ffffffff8143fe1c R09: 1ffffffff2037b8d
R10: dffffc0000000000 R11: fffffbfff2037b8e R12: 1ffff920007c6e08
R13: 1ffff1100f973597 R14: ffffc90003e37060 R15: ffff88807cb9ac98
FS:  0000555586d8f480(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000000 CR3: 0000000033636000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 untrack_pfn+0x327/0x640 arch/x86/mm/pat/memtype.c:1085
 unmap_single_vma+0x1f6/0x2b0 mm/memory.c:1834
 zap_page_range_single+0x45c/0x630 mm/memory.c:1935
 remap_pfn_range_notrack+0xc8e/0xe10 mm/memory.c:2708
 remap_pfn_range+0x12c/0x1b0 mm/memory.c:2733
 usbdev_mmap+0x4ba/0x900 drivers/usb/core/devio.c:276
 call_mmap include/linux/fs.h:2172 [inline]
 mmap_region+0x1689/0x2940 mm/mmap.c:1450
 do_mmap+0x8f0/0x1000 mm/mmap.c:496
 vm_mmap_pgoff+0x1dd/0x3d0 mm/util.c:588
 ksys_mmap_pgoff+0x4eb/0x720 mm/mmap.c:542
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc6265e02e9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffccfb961e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fc6265e02e9
RDX: 0000000000000000 RSI: 0000000000003000 RDI: 0000000020ff6000
RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000013 R11: 0000000000000246 R12: 00007fc626624153
R13: 00007ffccfb96260 R14: 00007fc62662a29c R15: 00007fc626624032
 </TASK>
----------------
Code disassembly (best guess):
   0:	ff c3                	inc    %ebx
   2:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
   9:	00 00 00
   c:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
  11:	48 89 f8             	mov    %rdi,%rax
  14:	48 89 f7             	mov    %rsi,%rdi
  17:	48 89 d6             	mov    %rdx,%rsi
  1a:	48 89 ca             	mov    %rcx,%rdx
  1d:	4d 89 c2             	mov    %r8,%r10
  20:	4d 89 c8             	mov    %r9,%r8
  23:	4c 8b 4c 24 08       	mov    0x8(%rsp),%r9
  28:	0f 05                	syscall
* 2a:	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax <-- trapping instruction
  30:	73 01                	jae    0x33
  32:	c3                   	ret
  33:	48 c7 c1 b8 ff ff ff 	mov    $0xffffffffffffffb8,%rcx
  3a:	f7 d8                	neg    %eax
  3c:	64 89 01             	mov    %eax,%fs:(%rcx)
  3f:	48                   	rex.W

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/07 07:56 upstream 7758b206117d df3dc63b .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in get_pat_info
2024/11/07 07:07 upstream 7758b206117d df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in get_pat_info
2024/09/03 20:24 upstream 67784a74e258 512328ba .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in get_pat_info
2024/11/11 01:29 upstream a9cda7c0ffed 6b856513 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in get_pat_info
2024/11/04 14:43 upstream 59b723cd2adb 0754ea12 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in get_pat_info
* Struck through repros no longer work on HEAD.