syzbot


general protection fault in vsscanf (2)

Status: upstream: reported C repro on 2024/12/16 03:40
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+8a3da2f1bbf59227c289@syzkaller.appspotmail.com
Fix commit: mm: huge_memory: handle strsep not finding delimiter
Patched on: [ci-upstream-linux-next-kasan-gce-root], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 9d11h, last: 3d13h
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] mm: huge_memory: Handle strsep not finding delimiter 2 (2) 2024/12/16 05:52
[syzbot] [mm?] general protection fault in vsscanf (2) 0 (1) 2024/12/16 03:40
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in vsscanf v9fs C 7 2325d 2355d 8/28 fixed on 2018/09/03 14:47
android-49 general protection fault in vsscanf C 6 2306d 2078d 0/3 public: reported C repro on 2019/04/14 00:00
linux-4.19 BUG: unable to handle kernel paging request in vsscanf (2) 2 1163d 1265d 0/1 auto-closed as invalid on 2022/02/11 22:53
upstream KMSAN: uninit-value in vsscanf bluetooth syz 9 1024d 1090d 0/28 auto-closed as invalid on 2022/09/27 18:52
linux-4.19 BUG: unable to handle kernel paging request in vsscanf (3) 1 971d 971d 0/1 auto-closed as invalid on 2022/08/22 19:56

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 UID: 0 PID: 5824 Comm: syz-executor367 Not tainted 6.13.0-rc3-syzkaller-00026-g59dbb9d81adf #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/25/2024
RIP: 0010:vsscanf+0x1a4/0x2a30 lib/vsprintf.c:3466
Code: db 74 5e e8 1e ab 82 f6 49 8d 5d 01 48 89 e9 48 ba 00 00 00 00 00 fc ff df 48 c1 e9 03 48 89 5c 24 70 49 89 dc 41 0f b6 45 00 <0f> b6 14 11 48 89 e9 83 e1 07 38 ca 7f 08 84 d2 0f 85 1e 19 00 00
RSP: 0018:ffffc90003ab7668 EFLAGS: 00010246
RAX: 0000000000000030 RBX: ffffffff8b5c8cc1 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: ffffffff8b16a3d2 RDI: 0000000000000001
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000030 R11: 0000000000000000 R12: ffffffff8b5c8cc1
R13: ffffffff8b5c8cc0 R14: dffffc0000000000 R15: ffffc90003ab7eb0
FS:  000055555d47e380(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200000c0 CR3: 0000000079692000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 sscanf+0xc8/0x100 lib/vsprintf.c:3722
 split_huge_pages_write+0xa16/0x1f60 mm/huge_memory.c:4178
 full_proxy_write+0xfb/0x1b0 fs/debugfs/file.c:356
 vfs_write+0x24c/0x1150 fs/read_write.c:677
 ksys_write+0x12b/0x250 fs/read_write.c:731
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8ad967c2e9
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 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:00007ffc718c3608 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007ffc718c37d8 RCX: 00007f8ad967c2e9
RDX: 0000000000000800 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 00007f8ad96ef610 R08: 0000000000000000 R09: 00007ffc718c37d8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffc718c37c8 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:vsscanf+0x1a4/0x2a30 lib/vsprintf.c:3466
Code: db 74 5e e8 1e ab 82 f6 49 8d 5d 01 48 89 e9 48 ba 00 00 00 00 00 fc ff df 48 c1 e9 03 48 89 5c 24 70 49 89 dc 41 0f b6 45 00 <0f> b6 14 11 48 89 e9 83 e1 07 38 ca 7f 08 84 d2 0f 85 1e 19 00 00
RSP: 0018:ffffc90003ab7668 EFLAGS: 00010246
RAX: 0000000000000030 RBX: ffffffff8b5c8cc1 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: ffffffff8b16a3d2 RDI: 0000000000000001
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000030 R11: 0000000000000000 R12: ffffffff8b5c8cc1
R13: ffffffff8b5c8cc0 R14: dffffc0000000000 R15: ffffc90003ab7eb0
FS:  000055555d47e380(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200000c0 CR3: 0000000079692000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	74 5e                	je     0x60
   2:	e8 1e ab 82 f6       	call   0xf682ab25
   7:	49 8d 5d 01          	lea    0x1(%r13),%rbx
   b:	48 89 e9             	mov    %rbp,%rcx
   e:	48 ba 00 00 00 00 00 	movabs $0xdffffc0000000000,%rdx
  15:	fc ff df
  18:	48 c1 e9 03          	shr    $0x3,%rcx
  1c:	48 89 5c 24 70       	mov    %rbx,0x70(%rsp)
  21:	49 89 dc             	mov    %rbx,%r12
  24:	41 0f b6 45 00       	movzbl 0x0(%r13),%eax
* 29:	0f b6 14 11          	movzbl (%rcx,%rdx,1),%edx <-- trapping instruction
  2d:	48 89 e9             	mov    %rbp,%rcx
  30:	83 e1 07             	and    $0x7,%ecx
  33:	38 ca                	cmp    %cl,%dl
  35:	7f 08                	jg     0x3f
  37:	84 d2                	test   %dl,%dl
  39:	0f 85 1e 19 00 00    	jne    0x195d

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/18 01:28 upstream 59dbb9d81adf a0626d3a .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in vsscanf
2024/12/12 06:38 upstream f92f4749861b 6f1b0fa8 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in vsscanf
2024/12/12 05:52 upstream f92f4749861b 6f1b0fa8 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in vsscanf
2024/12/12 05:06 upstream f92f4749861b 6f1b0fa8 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in vsscanf
2024/12/12 04:20 upstream f92f4749861b 6f1b0fa8 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in vsscanf
2024/12/15 21:18 upstream 2d8308bf5b67 7cbfbb3a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in vsscanf
2024/12/14 23:52 upstream a0e3919a2df2 7cbfbb3a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in vsscanf
2024/12/12 07:00 upstream f92f4749861b 6f1b0fa8 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in vsscanf
2024/12/12 03:30 upstream f92f4749861b 6f1b0fa8 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto general protection fault in vsscanf
* Struck through repros no longer work on HEAD.