syzbot


BUG: unable to handle kernel NULL pointer dereference in lock_page

Status: fixed on 2023/02/24 13:50
Subsystems: nilfs
[Documentation on labels]
Reported-by: syzbot+77e4f005cb899d4268d1@syzkaller.appspotmail.com
Fix commit: 512c5ca01a36 nilfs2: fix nilfs_sufile_mark_dirty() not set segment usage as dirty
First crash: 718d, last: 708d
Cause bisection: failed (error log, bisect log)
  
Discussions (5)
Title Replies (including bot) Last reply
[syzbot] BUG: unable to handle kernel NULL pointer dereference in lock_page 1 (2) 2022/12/01 11:29
[PATCH v3] nilfs2: Fix nilfs_sufile_mark_dirty() not set segment usage as dirty 2 (2) 2022/11/21 09:48
[PATCH v2] nilfs2: Fix nilfs_sufile_mark_dirty() not set segment usage as dirty 7 (7) 2022/11/21 09:06
[PATCH] nilfs2: Fix nilfs_sufile_mark_dirty() not set segment usage as dirty 8 (8) 2022/11/19 09:39
[PATCH] nilfs2: fix NULL pointer dereference in nilfs_segctor_prepare_write() 12 (12) 2022/11/09 14:00

Sample crash report:
NILFS (loop0): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000168
Mem abort info:
  ESR = 0x0000000096000004
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x04: level 0 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000004
  CM = 0, WnR = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=0000000108bcf000
[0000000000000168] pgd=0000000000000000, p4d=0000000000000000
Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 3032 Comm: segctord Not tainted 6.0.0-rc7-syzkaller-18095-gbbed346d5a96 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : _compound_head include/linux/page-flags.h:253 [inline]
pc : lock_page+0x28/0x1e0 include/linux/pagemap.h:958
lr : lock_page+0x28/0x1e0 include/linux/pagemap.h:956
sp : ffff80001290bc00
x29: ffff80001290bc00 x28: ffff80001290bde0 x27: 000000000000001b
x26: fffffc000330d7c0 x25: ffff0000caa56d68 x24: ffff0000ca9fb1c0
x23: 0000000000000080 x22: ffff0000ca9fb130 x21: 0000000000000160
x20: ffff0000c91e10b8 x19: 0000000000000160 x18: 00000000000000c0
x17: ffff80000dd0b198 x16: ffff80000db49158 x15: ffff0000c3e63500
x14: 0000000000000000 x13: 00000000ffffffff x12: ffff0000c3e63500
x11: ff808000095d1a0c x10: 0000000000000000 x9 : 0000000000000000
x8 : 0000000000000000 x7 : ffff80000856806c x6 : 0000000000000000
x5 : 0000000000000080 x4 : 0000000000000000 x3 : 0000000000000000
x2 : 0000000000000000 x1 : ffff80000cb431b1 x0 : 0000000000000000
Call trace:
 lock_page+0x28/0x1e0 include/linux/pagemap.h:956
 nilfs_segctor_prepare_write+0x6c/0x21c fs/nilfs2/segment.c:1658
 nilfs_segctor_do_construct+0x9f4/0xee8 fs/nilfs2/segment.c:2068
 nilfs_segctor_construct+0xa0/0x380 fs/nilfs2/segment.c:2375
 nilfs_segctor_thread_construct fs/nilfs2/segment.c:2483 [inline]
 nilfs_segctor_thread+0x180/0x660 fs/nilfs2/segment.c:2566
 kthread+0x12c/0x158 kernel/kthread.c:376
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860
Code: 9001df80 912a5000 52807781 97c7bd0e (f9400674) 
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
   0:	9001df80 	adrp	x0, 0x3bf0000
   4:	912a5000 	add	x0, x0, #0xa94
   8:	52807781 	mov	w1, #0x3bc                 	// #956
   c:	97c7bd0e 	bl	0xffffffffff1ef444
* 10:	f9400674 	ldr	x20, [x19, #8] <-- trapping instruction

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/10/28 01:56 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 86777b7f .config console log report syz C [disk image] [vmlinux] [mounted in repro] ci-upstream-gce-arm64 BUG: unable to handle kernel NULL pointer dereference in lock_page
2022/11/06 17:21 upstream 2f5065a0bc9d 6d752409 .config strace log report syz C [mounted in repro] ci-upstream-kasan-gce-root general protection fault in lock_page
2022/10/28 02:25 upstream b229b6ca5abb 5c716ff6 .config strace log report syz C [mounted in repro] ci2-upstream-fs general protection fault in lock_page
2022/10/28 01:38 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 86777b7f .config console log report info [disk image] [vmlinux] ci-upstream-gce-arm64 BUG: unable to handle kernel NULL pointer dereference in lock_page
* Struck through repros no longer work on HEAD.