syzbot


general protection fault in end_page_writeback

Status: fixed on 2023/02/24 13:50
Subsystems: mm nilfs
[Documentation on labels]
Reported-by: syzbot+c9db9ae0bd780a3094e1@syzkaller.appspotmail.com
Fix commit: 512c5ca01a36 nilfs2: fix nilfs_sufile_mark_dirty() not set segment usage as dirty
First crash: 550d, last: 519d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: fixed by (bisect log) :
commit 512c5ca01a3610ab14ff6309db363de51f1c13a6
Author: Chen Zhongjin <chenzhongjin@huawei.com>
Date: Fri Nov 18 06:33:04 2022 +0000

  nilfs2: fix nilfs_sufile_mark_dirty() not set segment usage as dirty

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] general protection fault in end_page_writeback 1 (3) 2023/01/27 07:18
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2023/01/26 23:24 6h40m bisect fix upstream job log (1)
2022/11/17 11:04 22m bisect fix upstream job log (0) log

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000009: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000048-0x000000000000004f]
CPU: 1 PID: 3607 Comm: segctord Not tainted 6.0.0-syzkaller-09589-g55be6084c8e0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
RIP: 0010:_compound_head include/linux/page-flags.h:253 [inline]
RIP: 0010:end_page_writeback+0x21/0x130 mm/folio-compat.c:26
Code: 00 eb b9 66 0f 1f 44 00 00 41 54 55 48 89 fd 53 e8 94 71 d3 ff 48 8d 7d 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 e4 00 00 00 4c 8b 65 08 31 ff 4c 89 e3 83 e3 01
RSP: 0018:ffffc90003f9fb20 EFLAGS: 00010216
RAX: dffffc0000000000 RBX: ffff888071099570 RCX: 0000000000000000
RDX: 0000000000000009 RSI: ffffffff81a7d8ac RDI: 0000000000000048
RBP: 0000000000000040 R08: 0000000000000001 R09: ffff888071099577
R10: ffffed100e2132ae R11: 0000000000000001 R12: ffff8880754f21f8
R13: dffffc0000000000 R14: 0000000000000040 R15: ffffea0002d63e00
FS:  0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000079554000 CR4: 0000000000350ee0
Call Trace:
 <TASK>
 nilfs_segctor_complete_write fs/nilfs2/segment.c:1836 [inline]
 nilfs_segctor_wait fs/nilfs2/segment.c:1923 [inline]
 nilfs_segctor_do_construct+0x491a/0x6970 fs/nilfs2/segment.c:2086
 nilfs_segctor_construct+0x8e3/0xb30 fs/nilfs2/segment.c:2375
 nilfs_segctor_thread_construct fs/nilfs2/segment.c:2483 [inline]
 nilfs_segctor_thread+0x3c3/0xf30 fs/nilfs2/segment.c:2566
 kthread+0x2e4/0x3a0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:_compound_head include/linux/page-flags.h:253 [inline]
RIP: 0010:end_page_writeback+0x21/0x130 mm/folio-compat.c:26
Code: 00 eb b9 66 0f 1f 44 00 00 41 54 55 48 89 fd 53 e8 94 71 d3 ff 48 8d 7d 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 e4 00 00 00 4c 8b 65 08 31 ff 4c 89 e3 83 e3 01
RSP: 0018:ffffc90003f9fb20 EFLAGS: 00010216
RAX: dffffc0000000000 RBX: ffff888071099570 RCX: 0000000000000000
RDX: 0000000000000009 RSI: ffffffff81a7d8ac RDI: 0000000000000048
RBP: 0000000000000040 R08: 0000000000000001 R09: ffff888071099577
R10: ffffed100e2132ae R11: 0000000000000001 R12: ffff8880754f21f8
R13: dffffc0000000000 R14: 0000000000000040 R15: ffffea0002d63e00
FS:  0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f966c269290 CR3: 000000007ec55000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess):
   0:	00 eb                	add    %ch,%bl
   2:	b9 66 0f 1f 44       	mov    $0x441f0f66,%ecx
   7:	00 00                	add    %al,(%rax)
   9:	41 54                	push   %r12
   b:	55                   	push   %rbp
   c:	48 89 fd             	mov    %rdi,%rbp
   f:	53                   	push   %rbx
  10:	e8 94 71 d3 ff       	callq  0xffd371a9
  15:	48 8d 7d 08          	lea    0x8(%rbp),%rdi
  19:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  20:	fc ff df
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 e4 00 00 00    	jne    0x118
  34:	4c 8b 65 08          	mov    0x8(%rbp),%r12
  38:	31 ff                	xor    %edi,%edi
  3a:	4c 89 e3             	mov    %r12,%rbx
  3d:	83 e3 01             	and    $0x1,%ebx

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/10/17 17:55 upstream 55be6084c8e0 67cb024c .config strace log report syz C [disk image] [vmlinux] [mounted in repro] ci-upstream-kasan-gce-root general protection fault in end_page_writeback
2022/10/17 17:37 upstream 55be6084c8e0 67cb024c .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-root general protection fault in end_page_writeback
* Struck through repros no longer work on HEAD.