syzbot


general protection fault in end_page_writeback

Status: upstream: reported C repro on 2022/10/17 20:27
Reported-by: syzbot+c9db9ae0bd780a3094e1@syzkaller.appspotmail.com
First crash: 40d, last: 9d14h

Cause bisection: failed (bisect 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

Fix bisection attempts:
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/11/17 11:27 upstream cc675d22e422 67cb024c .config log report syz C
* Struck through repros no longer work on HEAD.
Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/10/17 17:55 upstream 55be6084c8e0 67cb024c .config log report syz C general protection fault in end_page_writeback
ci-upstream-kasan-gce-root 2022/10/17 17:37 upstream 55be6084c8e0 67cb024c .config log report info general protection fault in end_page_writeback
* Struck through repros no longer work on HEAD.