syzbot


general protection fault in f2fs_recover_fsync_data

Status: upstream: reported C repro on 2022/11/06 11:04
Reported-by: syzbot+60567f83d5c03f63ac6e@syzkaller.appspotmail.com
First crash: 757d, last: 757d
Fix bisection: failed (error log, bisect log)
  

Sample crash report:
F2FS-fs (loop0): Found nat_bits in checkpoint
attempt to access beyond end of device
loop0: rw=8192, want=36920, limit=36912
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8108 Comm: syz-executor802 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:__read_once_size include/linux/compiler.h:263 [inline]
RIP: 0010:compound_head include/linux/page-flags.h:142 [inline]
RIP: 0010:PageLocked include/linux/page-flags.h:272 [inline]
RIP: 0010:f2fs_put_page fs/f2fs/f2fs.h:2063 [inline]
RIP: 0010:find_fsync_dnodes fs/f2fs/recovery.c:344 [inline]
RIP: 0010:f2fs_recover_fsync_data+0x107e/0x7e50 fs/f2fs/recovery.c:707
Code: fe 48 83 3c 24 00 0f 84 c6 01 00 00 e8 fb c0 42 fe 48 8b 04 24 48 8d 68 08 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 1d 6a 00 00 4c 8b 24 24 31 ff 49 8b 5c 24 08 49
RSP: 0018:ffff88809b8ff790 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: fffffffffffffffb RCX: ffffffff831fb8c4
RDX: 0000000000000000 RSI: ffffffff831fc475 RDI: 0000000000000007
RBP: 0000000000000003 R08: 0000000000000001 R09: fffffffffffff000
R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000008
R13: 00000000fffffffb R14: ffff8880a309de40 R15: dffffc0000000000
FS:  0000555556fd8300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005634b46bd970 CR3: 00000000a5947000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 f2fs_fill_super+0x386f/0x7050 fs/f2fs/super.c:3113
 mount_bdev+0x2fc/0x3b0 fs/super.c:1158
 mount_fs+0xa3/0x310 fs/super.c:1261
 vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
 vfs_kern_mount fs/namespace.c:951 [inline]
 do_new_mount fs/namespace.c:2492 [inline]
 do_mount+0x115c/0x2f50 fs/namespace.c:2822
 ksys_mount+0xcf/0x130 fs/namespace.c:3038
 __do_sys_mount fs/namespace.c:3052 [inline]
 __se_sys_mount fs/namespace.c:3049 [inline]
 __x64_sys_mount+0xba/0x150 fs/namespace.c:3049
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f7a200ababa
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 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:00007fff893e64a8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f7a200ababa
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fff893e64c0
RBP: 00007fff893e64c0 R08: 00007fff893e6500 R09: 0000555556fd82c0
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000000000004
R13: 00007fff893e6500 R14: 000000000000003a R15: 0000000020000770
Modules linked in:
---[ end trace 53bd8f3a59322f76 ]---
RIP: 0010:__read_once_size include/linux/compiler.h:263 [inline]
RIP: 0010:compound_head include/linux/page-flags.h:142 [inline]
RIP: 0010:PageLocked include/linux/page-flags.h:272 [inline]
RIP: 0010:f2fs_put_page fs/f2fs/f2fs.h:2063 [inline]
RIP: 0010:find_fsync_dnodes fs/f2fs/recovery.c:344 [inline]
RIP: 0010:f2fs_recover_fsync_data+0x107e/0x7e50 fs/f2fs/recovery.c:707
Code: fe 48 83 3c 24 00 0f 84 c6 01 00 00 e8 fb c0 42 fe 48 8b 04 24 48 8d 68 08 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 1d 6a 00 00 4c 8b 24 24 31 ff 49 8b 5c 24 08 49
RSP: 0018:ffff88809b8ff790 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: fffffffffffffffb RCX: ffffffff831fb8c4
RDX: 0000000000000000 RSI: ffffffff831fc475 RDI: 0000000000000007
RBP: 0000000000000003 R08: 0000000000000001 R09: fffffffffffff000
R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000008
R13: 00000000fffffffb R14: ffff8880a309de40 R15: dffffc0000000000
FS:  0000555556fd8300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005634b46bd970 CR3: 00000000a5947000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	fe 48 83             	decb   -0x7d(%rax)
   3:	3c 24                	cmp    $0x24,%al
   5:	00 0f                	add    %cl,(%rdi)
   7:	84 c6                	test   %al,%dh
   9:	01 00                	add    %eax,(%rax)
   b:	00 e8                	add    %ch,%al
   d:	fb                   	sti
   e:	c0 42 fe 48          	rolb   $0x48,-0x2(%rdx)
  12:	8b 04 24             	mov    (%rsp),%eax
  15:	48 8d 68 08          	lea    0x8(%rax),%rbp
  19:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  20:	fc ff df
  23:	48 89 ea             	mov    %rbp,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 1d 6a 00 00    	jne    0x6a51
  34:	4c 8b 24 24          	mov    (%rsp),%r12
  38:	31 ff                	xor    %edi,%edi
  3a:	49 8b 5c 24 08       	mov    0x8(%r12),%rbx
  3f:	49                   	rex.WB

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/06 11:22 linux-4.19.y 3f8a27f9e27b 6d752409 .config console log report syz C [disk image] [vmlinux] [mounted in repro] ci2-linux-4-19 general protection fault in f2fs_recover_fsync_data
2022/11/06 11:04 linux-4.19.y 3f8a27f9e27b 6d752409 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 general protection fault in f2fs_recover_fsync_data
* Struck through repros no longer work on HEAD.