syzbot


general protection fault in legacy_parse_param

Status: fixed on 2023/02/24 13:50
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+d1e3b1d92d25abf97943@syzkaller.appspotmail.com
Fix commit: ecff30575b5a LSM: general protection fault in legacy_parse_param
First crash: 1031d, last: 765d
Cause bisection: introduced by (bisect log) :
commit 54261af473be4c5481f6196064445d2945f2bdab
Author: KP Singh <kpsingh@google.com>
Date: Thu Apr 30 15:52:40 2020 +0000

  security: Fix the default value of fs_context_parse_param hook

Crash: general protection fault in legacy_parse_param (log)
Repro: C syz .config
  
Discussions (12)
Title Replies (including bot) Last reply
[PATCH AUTOSEL 5.17 01/43] LSM: general protection fault in legacy_parse_param 62 (62) 2022/07/08 09:22
[PATCH 5.10 000/599] 5.10.110-rc1 review 628 (629) 2022/05/08 12:31
[PATCH 5.4 000/475] 5.4.189-rc1 review 485 (486) 2022/04/15 15:35
[PATCH 5.16 0000/1017] 5.16.19-rc1 review 1034 (1035) 2022/04/07 08:34
[PATCH 5.15 000/913] 5.15.33-rc1 review 932 (933) 2022/04/06 15:36
[PATCH 5.17 0000/1126] 5.17.2-rc1 review 1143 (1144) 2022/04/06 14:06
[PATCH AUTOSEL 5.4 01/16] LSM: general protection fault in legacy_parse_param 16 (16) 2022/03/28 11:23
[PATCH AUTOSEL 5.10 01/21] LSM: general protection fault in legacy_parse_param 21 (21) 2022/03/28 11:22
[PATCH AUTOSEL 5.15 01/29] LSM: general protection fault in legacy_parse_param 29 (29) 2022/03/28 11:21
[PATCH AUTOSEL 5.16 01/35] LSM: general protection fault in legacy_parse_param 35 (35) 2022/03/28 11:20
[PATCH] LSM: general protection fault in legacy_parse_param 13 (13) 2022/01/28 08:59
[syzbot] general protection fault in legacy_parse_param 14 (17) 2021/08/31 07:38
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 KASAN: slab-out-of-bounds Write in legacy_parse_param C error 1 844d 844d 1/2 fixed on 2022/01/27 16:02
android-54 KASAN: slab-out-of-bounds Write in legacy_parse_param C 2 844d 844d 0/2 auto-obsoleted due to no activity on 2023/04/21 18:01
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2022/01/31 03:47 19m bisect fix upstream job log (0) log
2021/10/05 00:40 20m bisect fix upstream job log (0) log

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: 0 PID: 8435 Comm: syz-executor272 Not tainted 5.14.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:memchr+0x2f/0x70 lib/string.c:1054
Code: 41 54 53 48 89 d3 41 89 f7 45 31 f6 49 bc 00 00 00 00 00 fc ff df 0f 1f 44 00 00 48 85 db 74 3b 48 89 fd 48 89 f8 48 c1 e8 03 <42> 0f b6 04 20 84 c0 75 0f 48 ff cb 48 8d 7d 01 44 38 7d 00 75 db
RSP: 0018:ffffc9000d9f7d08 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffff88801c1f3880
RDX: 0000000000000001 RSI: 000000000000002c RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81e3db46 R09: ffffffff81e3d8e2
R10: 0000000000000002 R11: ffff88801c1f3880 R12: dffffc0000000000
R13: 1ffff92001b3efcc R14: 0000000000000000 R15: 000000000000002c
FS:  0000000000deb300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000044 CR3: 0000000037173000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 legacy_parse_param+0x49b/0x810 fs/fs_context.c:555
 vfs_parse_fs_param+0x1df/0x460 fs/fs_context.c:146
 vfs_fsconfig_locked fs/fsopen.c:265 [inline]
 __do_sys_fsconfig fs/fsopen.c:439 [inline]
 __se_sys_fsconfig+0xba9/0xff0 fs/fsopen.c:314
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x43ee69
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc5e9e0b98 EFLAGS: 00000246 ORIG_RAX: 00000000000001af
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee69
RDX: 0000000020000080 RSI: 0000000000000001 RDI: 0000000000000003
RBP: 0000000000402e50 R08: 0000000000000000 R09: 0000000000400488
R10: 00000000200000c0 R11: 0000000000000246 R12: 0000000000402ee0
R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488
Modules linked in:
---[ end trace 74baf661f3b47b0a ]---
RIP: 0010:memchr+0x2f/0x70 lib/string.c:1054
Code: 41 54 53 48 89 d3 41 89 f7 45 31 f6 49 bc 00 00 00 00 00 fc ff df 0f 1f 44 00 00 48 85 db 74 3b 48 89 fd 48 89 f8 48 c1 e8 03 <42> 0f b6 04 20 84 c0 75 0f 48 ff cb 48 8d 7d 01 44 38 7d 00 75 db
RSP: 0018:ffffc9000d9f7d08 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffff88801c1f3880
RDX: 0000000000000001 RSI: 000000000000002c RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81e3db46 R09: ffffffff81e3d8e2
R10: 0000000000000002 R11: ffff88801c1f3880 R12: dffffc0000000000
R13: 1ffff92001b3efcc R14: 0000000000000000 R15: 000000000000002c
FS:  0000000000deb300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fed5f8146c0 CR3: 0000000037173000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	41 54                	push   %r12
   2:	53                   	push   %rbx
   3:	48 89 d3             	mov    %rdx,%rbx
   6:	41 89 f7             	mov    %esi,%r15d
   9:	45 31 f6             	xor    %r14d,%r14d
   c:	49 bc 00 00 00 00 00 	movabs $0xdffffc0000000000,%r12
  13:	fc ff df
  16:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
  1b:	48 85 db             	test   %rbx,%rbx
  1e:	74 3b                	je     0x5b
  20:	48 89 fd             	mov    %rdi,%rbp
  23:	48 89 f8             	mov    %rdi,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 0f b6 04 20       	movzbl (%rax,%r12,1),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	75 0f                	jne    0x42
  33:	48 ff cb             	dec    %rbx
  36:	48 8d 7d 01          	lea    0x1(%rbp),%rdi
  3a:	44 38 7d 00          	cmp    %r15b,0x0(%rbp)
  3e:	75 db                	jne    0x1b

Crashes (20):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/08/27 14:48 upstream 77dd11439b86 b318694d .config console log report syz C ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2022/01/01 03:47 upstream 4f3d93c6eaff e1768e9c .config console log report syz ci-upstream-kasan-gce KASAN: slab-out-of-bounds Write in legacy_parse_param
2022/03/21 16:05 upstream f443e374ae13 e2d91b1d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2022/03/11 15:39 upstream dda64ead7e82 9e8eaa75 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2022/03/11 02:28 upstream 3bf7edc84a9e 9e8eaa75 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2022/02/24 12:07 upstream 23d04328444a 6e821dbf .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2022/02/22 06:08 upstream 038101e6b2cd 6e821dbf .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2022/02/20 13:06 upstream 4f12b742eb2b 3cd800e4 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2021/12/24 08:42 upstream 76657eaef4a7 6caa12e4 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2021/12/12 10:57 upstream a763d5a5abd6 49ca1f59 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2021/12/02 06:00 upstream 58e1100fdc59 61f86278 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2021/11/06 19:25 upstream fe91c4725aee 4c1be0be .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2021/10/24 23:32 upstream 6c62666d8879 282f03fb .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2021/10/24 23:30 upstream 6c62666d8879 282f03fb .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2021/10/12 11:22 upstream fa5878760579 838e7e2c .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2021/10/12 09:32 upstream fa5878760579 838e7e2c .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2021/09/05 00:40 upstream f1583cb1be35 d236a457 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2021/09/02 14:20 upstream 4ac6d90867a4 15cea0a3 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2021/08/27 14:36 upstream 77dd11439b86 b318694d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
2021/06/28 21:55 upstream 62fb9874f5da 9d2ab5df .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in legacy_parse_param
* Struck through repros no longer work on HEAD.