syzbot


general protection fault in f2fs_check_opt_consistency

Status: upstream: reported C repro on 2025/08/16 03:18
Subsystems: f2fs
[Documentation on labels]
Reported-by: syzbot+d371efea57d5aeab877b@syzkaller.appspotmail.com
First crash: 11d, last: 11d
Cause bisection: introduced by (bisect log) :
commit d185351325237da688de006a2c579e82ea97bdfe
Author: Hongbo Li <lihongbo22@huawei.com>
Date: Thu Jul 10 12:14:13 2025 +0000

  f2fs: separate the options parsing and options checking

Crash: BUG: unable to handle kernel NULL pointer dereference in f2fs_check_opt_consistency (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH 1/2] f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency() 2 (2) 2025/08/19 01:15
[syzbot] [f2fs?] general protection fault in f2fs_check_opt_consistency 1 (3) 2025/08/17 04:13
Last patch testing requests (1)
Created Duration User Patch Repo Result
2025/08/17 03:35 24m chao@kernel.org https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git bugfix/syzbot OK log

Sample crash report:
F2FS-fs (loop0): f2fs_recover_fsync_data: recovery fsync data, check_only: 0
F2FS-fs (loop0): Mounted with checkpoint version = 48b305e4
Oops: gen[  107.736417][ T5848] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 5848 Comm: syz-executor263 Tainted: G        W           6.17.0-rc1-syzkaller-00014-g0e39a731820a #0 PREEMPT_{RT,(full)} 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:strcmp+0x3c/0xc0 lib/string.c:284
Code: 00 fc ff df 45 31 f6 4a 8d 04 37 48 89 c1 48 c1 e9 03 0f b6 0c 19 84 c9 75 2c 42 0f b6 2c 37 4a 8d 04 36 48 89 c1 48 c1 e9 03 <0f> b6 0c 19 84 c9 75 33 42 0f b6 0c 36 40 38 cd 75 48 49 ff c6 40
RSP: 0018:ffffc90004adf8f8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: 0000000021ec2c00 RSI: 0000000000000000 RDI: ffff888021ec2c80
RBP: 0000000000000066 R08: 0000000000000000 R09: 0000000000000000
R10: ffff88803d2c9768 R11: ffffed1007a592fb R12: 1ffff1100611a891
R13: 0000000000000000 R14: 0000000000000000 R15: ffff888021ec2c80
FS:  0000555575c20480(0000) GS:ffff8881269c5000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000001000 CR3: 000000003d342000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 f2fs_check_quota_consistency fs/f2fs/super.c:1188 [inline]
 f2fs_check_opt_consistency+0x1378/0x2c10 fs/f2fs/super.c:1436
 __f2fs_remount fs/f2fs/super.c:2653 [inline]
 f2fs_reconfigure+0x482/0x1770 fs/f2fs/super.c:5297
 reconfigure_super+0x224/0x890 fs/super.c:1077
 do_remount fs/namespace.c:3314 [inline]
 path_mount+0xd18/0xfe0 fs/namespace.c:4112
 do_mount fs/namespace.c:4133 [inline]
 __do_sys_mount fs/namespace.c:4344 [inline]
 __se_sys_mount+0x317/0x410 fs/namespace.c:4321
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f13267ca259
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 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:00007fff3d15d4a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f13267ca259
RDX: 0000000000000000 RSI: 0000200000000040 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000200000000140 R09: 00007fff3d15d4e0
R10: 0000000000000020 R11: 0000000000000246 R12: 00007fff3d15d4e0
R13: 00007fff3d15d768 R14: 431bde82d7b634db R15: 00007f132681303b
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:strcmp+0x3c/0xc0 lib/string.c:284
Code: 00 fc ff df 45 31 f6 4a 8d 04 37 48 89 c1 48 c1 e9 03 0f b6 0c 19 84 c9 75 2c 42 0f b6 2c 37 4a 8d 04 36 48 89 c1 48 c1 e9 03 <0f> b6 0c 19 84 c9 75 33 42 0f b6 0c 36 40 38 cd 75 48 49 ff c6 40
RSP: 0018:ffffc90004adf8f8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: 0000000021ec2c00 RSI: 0000000000000000 RDI: ffff888021ec2c80
RBP: 0000000000000066 R08: 0000000000000000 R09: 0000000000000000
R10: ffff88803d2c9768 R11: ffffed1007a592fb R12: 1ffff1100611a891
R13: 0000000000000000 R14: 0000000000000000 R15: ffff888021ec2c80
FS:  0000555575c20480(0000) GS:ffff8881268c5000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000003d342000 CR4: 00000000003526f0
----------------
Code disassembly (best guess), 4 bytes skipped:
   0:	45 31 f6             	xor    %r14d,%r14d
   3:	4a 8d 04 37          	lea    (%rdi,%r14,1),%rax
   7:	48 89 c1             	mov    %rax,%rcx
   a:	48 c1 e9 03          	shr    $0x3,%rcx
   e:	0f b6 0c 19          	movzbl (%rcx,%rbx,1),%ecx
  12:	84 c9                	test   %cl,%cl
  14:	75 2c                	jne    0x42
  16:	42 0f b6 2c 37       	movzbl (%rdi,%r14,1),%ebp
  1b:	4a 8d 04 36          	lea    (%rsi,%r14,1),%rax
  1f:	48 89 c1             	mov    %rax,%rcx
  22:	48 c1 e9 03          	shr    $0x3,%rcx
* 26:	0f b6 0c 19          	movzbl (%rcx,%rbx,1),%ecx <-- trapping instruction
  2a:	84 c9                	test   %cl,%cl
  2c:	75 33                	jne    0x61
  2e:	42 0f b6 0c 36       	movzbl (%rsi,%r14,1),%ecx
  33:	40 38 cd             	cmp    %cl,%bpl
  36:	75 48                	jne    0x80
  38:	49 ff c6             	inc    %r14
  3b:	40                   	rex

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/13 07:56 upstream 0e39a731820a 22ec1469 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-upstream-fs general protection fault in f2fs_check_opt_consistency
2025/08/13 05:59 upstream 0e39a731820a 22ec1469 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci-snapshot-upstream-root general protection fault in f2fs_check_opt_consistency
2025/08/13 04:59 upstream 0e39a731820a 22ec1469 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in f2fs_check_opt_consistency
* Struck through repros no longer work on HEAD.