syzbot


general protection fault in hugetlbfs_parse_param

Status: fixed on 2023/02/24 13:50
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+a3e6acd85ded5c16a709@syzkaller.appspotmail.com
Fix commit: 26215b7ee923 hugetlbfs: fix null-ptr-deref in hugetlbfs_parse_param()
First crash: 553d, last: 541d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH AUTOSEL 6.1 01/16] crypto: hisilicon/hpre - fix resource leak in remove process 18 (18) 2022/12/21 12:19
[PATCH AUTOSEL 5.4 1/5] hugetlbfs: fix null-ptr-deref in hugetlbfs_parse_param() 5 (5) 2022/12/20 01:22
[PATCH AUTOSEL 5.10 1/5] hugetlbfs: fix null-ptr-deref in hugetlbfs_parse_param() 5 (5) 2022/12/20 01:22
[PATCH AUTOSEL 5.15 1/9] crypto: hisilicon/hpre - fix resource leak in remove process 9 (9) 2022/12/20 01:21
[PATCH AUTOSEL 6.0 01/16] crypto: hisilicon/hpre - fix resource leak in remove process 16 (16) 2022/12/20 01:21
[syzbot] general protection fault in _parse_integer_fixup_radix 4 (5) 2022/10/24 00:06
[PATCH -next] hugetlbfs: fix null-ptr-deref in hugetlbfs_parse_param() 5 (5) 2022/10/22 00:20
[syzbot] general protection fault in hugetlbfs_parse_param 0 (1) 2022/10/20 06:17
Last patch testing requests (2)
Created Duration User Patch Repo Result
2022/10/20 14:23 16m yin31149@gmail.com patch https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git master OK log
2022/10/20 12:54 16m yin31149@gmail.com patch https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git master OK log
Cause bisection attempts (1)
Created Duration User Patch Repo Result
2022/10/20 08:53 0m bisect linux-next error job log (0)
marked invalid by web-security-scanner@google.com

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 3607 Comm: syz-executor454 Not tainted 6.1.0-rc1-next-20221019-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
RIP: 0010:hugetlbfs_parse_param+0x1dd/0x8e0 fs/hugetlbfs/inode.c:1380
Code: 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 84 06 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 65 10 4c 89 e2 48 c1 ea 03 <0f> b6 04 02 4c 89 e2 83 e2 07 38 d0 7f 0c 84 c0 74 08 4c 89 e7 e8
RSP: 0018:ffffc90003a5fb48 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff9200074bf6b RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff82350899 RDI: ffffc90003a5fc78
RBP: ffff88801db5ac00 R08: 0000000000000005 R09: 0000000000000006
R10: 0000000000000005 R11: 000000000008c001 R12: 0000000000000000
R13: ffffc90003a5fc68 R14: ffff88801d5fbf00 R15: ffff88801db5acd0
FS:  00005555569383c0(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001000 CR3: 0000000074e4c000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 vfs_parse_fs_param fs/fs_context.c:148 [inline]
 vfs_parse_fs_param+0x1f9/0x3c0 fs/fs_context.c:129
 vfs_parse_fs_string+0xdb/0x170 fs/fs_context.c:191
 generic_parse_monolithic+0x16f/0x1f0 fs/fs_context.c:231
 do_new_mount fs/namespace.c:3036 [inline]
 path_mount+0x12de/0x1e20 fs/namespace.c:3370
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount fs/namespace.c:3568 [inline]
 __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f06d8633fe9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe278e8e18 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe278e8e28 RCX: 00007f06d8633fe9
RDX: 0000000020000040 RSI: 0000000020000000 RDI: 0000000000000000
RBP: 00007ffe278e8e20 R08: 0000000020000280 R09: 00007f06d85f20a0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:hugetlbfs_parse_param+0x1dd/0x8e0 fs/hugetlbfs/inode.c:1380
Code: 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 84 06 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 65 10 4c 89 e2 48 c1 ea 03 <0f> b6 04 02 4c 89 e2 83 e2 07 38 d0 7f 0c 84 c0 74 08 4c 89 e7 e8
RSP: 0018:ffffc90003a5fb48 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff9200074bf6b RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff82350899 RDI: ffffc90003a5fc78
RBP: ffff88801db5ac00 R08: 0000000000000005 R09: 0000000000000006
R10: 0000000000000005 R11: 000000000008c001 R12: 0000000000000000
R13: ffffc90003a5fc68 R14: ffff88801d5fbf00 R15: ffff88801db5acd0
FS:  00005555569383c0(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f06d86453c0 CR3: 0000000074e4c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 3 bytes skipped:
   0:	df 48 89             	fisttps -0x77(%rax)
   3:	fa                   	cli
   4:	48 c1 ea 03          	shr    $0x3,%rdx
   8:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   c:	0f 85 84 06 00 00    	jne    0x696
  12:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  19:	fc ff df
  1c:	4d 8b 65 10          	mov    0x10(%r13),%r12
  20:	4c 89 e2             	mov    %r12,%rdx
  23:	48 c1 ea 03          	shr    $0x3,%rdx
* 27:	0f b6 04 02          	movzbl (%rdx,%rax,1),%eax <-- trapping instruction
  2b:	4c 89 e2             	mov    %r12,%rdx
  2e:	83 e2 07             	and    $0x7,%edx
  31:	38 d0                	cmp    %dl,%al
  33:	7f 0c                	jg     0x41
  35:	84 c0                	test   %al,%al
  37:	74 08                	je     0x41
  39:	4c 89 e7             	mov    %r12,%rdi
  3c:	e8                   	.byte 0xe8

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/10/20 02:44 linux-next a72b55bc981b b31320fc .config strace log report syz C [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in hugetlbfs_parse_param
2022/10/31 11:33 linux-next 4d48f589d294 2a71366b .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in hugetlbfs_parse_param
2022/10/31 05:12 linux-next 4d48f589d294 2a71366b .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in hugetlbfs_parse_param
2022/10/26 05:19 linux-next 4d48f589d294 1984aebd .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in hugetlbfs_parse_param
2022/10/20 02:32 linux-next a72b55bc981b b31320fc .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in hugetlbfs_parse_param
* Struck through repros no longer work on HEAD.