syzbot


BUG: unable to handle kernel NULL pointer dereference in folio_mark_dirty

Status: upstream: reported on 2021/12/04 09:55
Reported-by: syzbot+7cd473c2cac13fd2dd72@syzkaller.appspotmail.com
First crash: 330d, last: 118d

Sample crash report:
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 1f77e067 P4D 1f77e067 PUD 0 
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 25101 Comm: syz-executor.2 Not tainted 5.18.0-syzkaller-13842-g952923ddc011 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc90002f9fa10 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffffffff89dba6e0 RCX: 0000000000000000
RDX: 1ffffffff13b74df RSI: ffffea00021447c0 RDI: ffff888034949798
RBP: ffff888034949798 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffea00021447c0
R13: ffff888075dd0000 R14: ffff88807b644000 R15: ffff888075dd0000
FS:  000055555567c400(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000026964000 CR4: 0000000000350ee0
Call Trace:
 <TASK>
 folio_mark_dirty+0xc1/0x140 mm/page-writeback.c:2723
 f2fs_update_meta_page+0x56/0x70 fs/f2fs/segment.c:2362
 do_checkpoint fs/f2fs/checkpoint.c:1519 [inline]
 f2fs_write_checkpoint+0x2b4b/0x4c70 fs/f2fs/checkpoint.c:1681
 __write_checkpoint_sync fs/f2fs/checkpoint.c:1752 [inline]
 f2fs_issue_checkpoint+0x156/0x460 fs/f2fs/checkpoint.c:1849
 f2fs_sync_fs+0x20f/0x420 fs/f2fs/super.c:1622
 sync_filesystem.part.0+0x13c/0x1d0 fs/sync.c:66
 sync_filesystem+0x8b/0xc0 fs/sync.c:43
 generic_shutdown_super+0x70/0x400 fs/super.c:445
 kill_block_super+0x97/0xf0 fs/super.c:1394
 kill_f2fs_super+0x2b3/0x3c0 fs/f2fs/super.c:4516
 deactivate_locked_super+0x94/0x160 fs/super.c:332
 deactivate_super+0xad/0xd0 fs/super.c:363
 cleanup_mnt+0x3a2/0x540 fs/namespace.c:1186
 task_work_run+0xdd/0x1a0 kernel/task_work.c:177
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:169 [inline]
 exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:201
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x46/0xb0
RIP: 0033:0x7f3a6948a577
Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc03384148 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f3a6948a577
RDX: 00007ffc0338421b RSI: 000000000000000a RDI: 00007ffc03384210
RBP: 00007ffc03384210 R08: 00000000ffffffff R09: 00007ffc03383fe0
R10: 000055555567d8b3 R11: 0000000000000246 R12: 00007f3a694e21f8
R13: 00007ffc033852d0 R14: 000055555567d810 R15: 00007ffc03385310
 </TASK>
Modules linked in:
CR2: 0000000000000000
---[ end trace 0000000000000000 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc90002f9fa10 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffffffff89dba6e0 RCX: 0000000000000000
RDX: 1ffffffff13b74df RSI: ffffea00021447c0 RDI: ffff888034949798
RBP: ffff888034949798 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffea00021447c0
R13: ffff888075dd0000 R14: ffff88807b644000 R15: ffff888075dd0000
FS:  000055555567c400(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000026964000 CR4: 0000000000350ee0

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/06/05 06:14 upstream 952923ddc011 c8857892 .config log report info BUG: unable to handle kernel NULL pointer dereference in folio_mark_dirty
ci-upstream-kasan-gce-smack-root 2022/03/12 07:40 upstream 68453767131a 9e8eaa75 .config log report info BUG: unable to handle kernel NULL pointer dereference in folio_mark_dirty
ci-upstream-kasan-gce-smack-root 2022/02/08 02:05 upstream 555f3d7be91a a7dab638 .config log report info BUG: unable to handle kernel NULL pointer dereference in folio_mark_dirty
ci-upstream-kasan-gce-smack-root 2022/01/13 16:24 upstream 455e73a07f6e 44d1319a .config log report info BUG: unable to handle kernel NULL pointer dereference in folio_mark_dirty
ci-upstream-kasan-gce-smack-root 2021/12/20 08:30 upstream a7904a538933 021b36cb .config log report info BUG: unable to handle kernel NULL pointer dereference in folio_mark_dirty
ci-upstream-kasan-gce-smack-root 2021/12/15 21:19 upstream 2b14864acbaa 572bcb40 .config log report info BUG: unable to handle kernel NULL pointer dereference in folio_mark_dirty
ci-upstream-kasan-gce-smack-root 2021/12/01 23:28 upstream 58e1100fdc59 61f86278 .config log report info BUG: unable to handle kernel NULL pointer dereference in folio_mark_dirty
ci-upstream-kasan-gce-smack-root 2021/11/04 18:13 upstream 7ddb58cb0eca 4c1be0be .config log report info BUG: unable to handle kernel NULL pointer dereference in folio_mark_dirty
* Struck through repros no longer work on HEAD.