syzbot


general protection fault in nilfs_clear_dirty_page

Status: upstream: reported on 2022/10/22 09:12
Reported-by: syzbot+53369d11851d8f26735c@syzkaller.appspotmail.com
First crash: 38d, last: 14d

Sample crash report:
NILFS (loop1): discard dirty block: blocknr=0, size=1024
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 102 Comm: kworker/u4:4 Not tainted 6.1.0-rc5-syzkaller-00008-ge01d50cbd6ee #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Workqueue: writeback wb_workfn (flush-7:1)
RIP: 0010:nilfs_clear_dirty_page+0x9a/0x1080 fs/nilfs2/page.c:387
Code: 31 e8 ca 3d 3c fe 49 8d 5f 18 48 89 d8 48 c1 e8 03 42 80 3c 30 00 74 08 48 89 df e8 c0 4f 90 fe 48 8b 1b 48 89 d8 48 c1 e8 03 <42> 80 3c 30 00 74 08 48 89 df e8 a7 4f 90 fe 4c 8b 2b 49 8d 5d 28
RSP: 0018:ffffc900015c7020 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff888019950000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffea00023af900
RBP: ffffc900015c70f0 R08: ffffffff834e281a R09: fffff94000475f21
R10: fffff94000475f21 R11: 1ffffd4000475f20 R12: 000000000000000c
R13: 0000000000000000 R14: dffffc0000000000 R15: ffffea00023af900
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c015383000 CR3: 000000007aceb000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 nilfs_clear_dirty_pages+0x1d9/0x380 fs/nilfs2/page.c:372
 nilfs_writepages+0x117/0x150 fs/nilfs2/inode.c:165
 do_writepages+0x3c3/0x680 mm/page-writeback.c:2469
 __writeback_single_inode+0xd1/0x670 fs/fs-writeback.c:1587
 writeback_sb_inodes+0xb3b/0x18f0 fs/fs-writeback.c:1870
 __writeback_inodes_wb+0x125/0x420 fs/fs-writeback.c:1941
 wb_writeback+0x440/0x7b0 fs/fs-writeback.c:2046
 wb_check_start_all fs/fs-writeback.c:2168 [inline]
 wb_do_writeback fs/fs-writeback.c:2194 [inline]
 wb_workfn+0x827/0xef0 fs/fs-writeback.c:2227
 process_one_work+0x877/0xdb0 kernel/workqueue.c:2289
 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436
 kthread+0x266/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
Modules linked in:
----------------
Code disassembly (best guess):
   0:	31 e8                	xor    %ebp,%eax
   2:	ca 3d 3c             	lret   $0x3c3d
   5:	fe 49 8d             	decb   -0x73(%rcx)
   8:	5f                   	pop    %rdi
   9:	18 48 89             	sbb    %cl,-0x77(%rax)
   c:	d8 48 c1             	fmuls  -0x3f(%rax)
   f:	e8 03 42 80 3c       	callq  0x3c804217
  14:	30 00                	xor    %al,(%rax)
  16:	74 08                	je     0x20
  18:	48 89 df             	mov    %rbx,%rdi
  1b:	e8 c0 4f 90 fe       	callq  0xfe904fe0
  20:	48 8b 1b             	mov    (%rbx),%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 30 00       	cmpb   $0x0,(%rax,%r14,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	48 89 df             	mov    %rbx,%rdi
  34:	e8 a7 4f 90 fe       	callq  0xfe904fe0
  39:	4c 8b 2b             	mov    (%rbx),%r13
  3c:	49 8d 5d 28          	lea    0x28(%r13),%rbx

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-fs 2022/11/15 02:20 upstream e01d50cbd6ee 97de9cfc .config log report info general protection fault in nilfs_clear_dirty_page
ci2-upstream-fs 2022/11/02 18:48 upstream b229b6ca5abb 08977f5d .config log report info general protection fault in nilfs_clear_dirty_page
ci2-upstream-fs 2022/11/01 18:42 upstream b229b6ca5abb a1d8560a .config log report info general protection fault in nilfs_clear_dirty_page
ci2-upstream-fs 2022/10/31 02:57 upstream b229b6ca5abb 2a71366b .config log report info general protection fault in nilfs_clear_dirty_page
ci2-upstream-fs 2022/10/30 22:49 upstream b229b6ca5abb 2a71366b .config log report info general protection fault in nilfs_clear_dirty_page
ci2-upstream-fs 2022/10/26 09:26 upstream 1a2dcbdde82e 2159e4d2 .config log report info general protection fault in nilfs_clear_dirty_page
ci2-upstream-fs 2022/10/24 00:40 upstream d47136c28015 23bf86af .config log report info general protection fault in nilfs_clear_dirty_page
ci2-upstream-fs 2022/10/22 01:18 upstream 6d36c728bc2e 63e790dd .config log report info general protection fault in nilfs_clear_dirty_page
* Struck through repros no longer work on HEAD.