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: 168d, last: 13d
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
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/12/05 18:31 3h26m retest repro upstream OK log

Sample crash report:
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 a1 1a 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:00007ffc9cc6d608 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007ffc9cc6d630 RCX: 00007fc0bc72c4e9
RDX: 000000000300000c RSI: 0000000000004000 RDI: 0000000020ff9000
RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000001000
R10: 0000000000028011 R11: 0000000000000246 R12: 00007ffc9cc6d62c
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
 </TASK>
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5836 at arch/x86/mm/pat/memtype.c:983 get_pat_info+0x1eb/0x3f0 arch/x86/mm/pat/memtype.c:983
Modules linked in:
CPU: 1 UID: 0 PID: 5836 Comm: syz-executor383 Not tainted 6.13.0-rc2-syzkaller #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 f4 20 51 00 48 83 fb 20 75 13 48 83 7c 24 10 00 0f 84 5e 01 00 00 e8 fd 1b 51 00 eb 09 e8 f6 1b 51 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:ffffc90003af6ee0 EFLAGS: 00010293
RAX: ffffffff814e424a RBX: 0000000000000028 RCX: ffff8880356a1e00
RDX: 0000000000000000 RSI: 0000000000000028 RDI: 0000000000000020
RBP: ffffc90003af6fd0 R08: ffffffff814e422c R09: 1ffffffff2032cae
R10: dffffc0000000000 R11: fffffbfff2032caf R12: 1ffff9200075ede0
R13: 1ffff1100f4f1c80 R14: ffffc90003af6f20 R15: ffff88807a78e3e0
FS:  000055557c43b380(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055557c43b650 CR3: 000000006ee40000 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:1848
 zap_page_range_single+0x45c/0x630 mm/memory.c:1949
 remap_pfn_range_notrack+0xc8e/0xe10 mm/memory.c:2722
 remap_pfn_range+0x12c/0x1b0 mm/memory.c:2747
 usbdev_mmap+0x537/0x970 drivers/usb/core/devio.c:279
 call_mmap include/linux/fs.h:2183 [inline]
 mmap_file mm/internal.h:124 [inline]
 __mmap_new_file_vma mm/vma.c:2291 [inline]
 __mmap_new_vma mm/vma.c:2355 [inline]
 __mmap_region+0x2204/0x2cd0 mm/vma.c:2456
 mmap_region+0x226/0x2c0 mm/mmap.c:1348
 do_mmap+0x8f0/0x1000 mm/mmap.c:496
 vm_mmap_pgoff+0x1dd/0x3d0 mm/util.c:580
 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:0x7fc0bc72c4e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 a1 1a 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:00007ffc9cc6d608 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007ffc9cc6d630 RCX: 00007fc0bc72c4e9
RDX: 000000000300000c RSI: 0000000000004000 RDI: 0000000020ff9000
RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000001000
R10: 0000000000028011 R11: 0000000000000246 R12: 00007ffc9cc6d62c
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
 </TASK>
----------------
Code disassembly (best guess):
   0:	28 00                	sub    %al,(%rax)
   2:	00 00                	add    %al,(%rax)
   4:	75 05                	jne    0xb
   6:	48 83 c4 28          	add    $0x28,%rsp
   a:	c3                   	ret
   b:	e8 a1 1a 00 00       	call   0x1ab1
  10:	90                   	nop
  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 (19):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/09 17:36 upstream fac04efc5c79 9ac0fdc6 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in get_pat_info
2025/02/06 00:29 upstream 92514ef226f5 577d049b .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in get_pat_info
2025/02/01 06:54 upstream 69e858e0b8b2 aa47157c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in get_pat_info
2025/01/25 03:52 upstream ae8b53aac327 9fbd772e .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in get_pat_info
2025/01/15 00:57 upstream c3812b15000c 7315a7cf .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in get_pat_info
2024/12/28 14:53 upstream fd0584d220fe d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in get_pat_info
2024/12/18 17:05 upstream aef25be35d23 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in get_pat_info
2024/12/18 17:00 upstream aef25be35d23 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in get_pat_info
2024/12/18 16:57 upstream aef25be35d23 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in get_pat_info
2024/12/09 16:51 upstream fac04efc5c79 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in get_pat_info
2024/11/21 14:45 upstream 43fb83c17ba2 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in get_pat_info
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
2025/01/05 11:29 upstream ab75170520d4 f3558dbf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in get_pat_info
2025/01/06 17:41 upstream 5428dc1906dd f3558dbf .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in get_pat_info
2024/12/18 10:08 upstream 59dbb9d81adf a0626d3a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-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.