BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page

Status: upstream: reported C repro on 2024/04/08 10:35
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+b998afe9239e90678c06@syzkaller.appspotmail.com
First crash: 963d, last: 127d
Fix commit to backport (bisect log) :
tree: upstream
commit cc249e4cba9a6002c9d9e1438daf8440a160bc9e
Author: Chao Yu <chao@kernel.org>
Date: Sun Nov 6 13:25:44 2022 +0000

  f2fs: fix to avoid accessing uninitialized spinlock

Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page (log)
Repro: C syz .config
▶ ▼ Bug presence (2)
Date Name Commit Repro Result
2024/04/24 linux-5.15.y (ToT) c52b9710c83d C [report] BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page
2024/04/24 upstream (ToT) 9d1ddab261f3 C Didn't crash
▶ ▼ Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page (2) f2fs 10 26 1499d 1703d 0/30 auto-obsoleted due to no activity on 2023/02/17 11:21
upstream BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page f2fs 10 8 1868d 1950d 0/30 auto-closed as invalid on 2022/02/13 04:53
▶ ▼ Last patch testing requests (10)
Created Duration User Patch Repo Result
2026/11/22 18:26 25m retest repro linux-5.15.y no crash job log log
2026/11/22 18:26 26m retest repro linux-5.15.y report job log log
2026/09/12 12:10 26m retest repro linux-5.15.y report job log log
2026/07/23 02:01 17m retest repro linux-5.15.y report log
2026/07/04 08:24 17m retest repro linux-5.15.y report log
2026/05/08 20:15 20m retest repro linux-5.15.y report log
2026/03/26 16:28 13m retest repro linux-5.15.y report log
2026/02/27 07:19 11m retest repro linux-5.15.y report log
2026/01/15 12:02 21m retest repro linux-5.15.y report log
2025/12/19 02:55 14m retest repro linux-5.15.y report log
▶ ▼ Fix bisection attempts (3)
Created Duration User Patch Repo Result
2024/07/17 21:50 5h52m fix candidate upstream OK (1) job log
2024/07/08 13:29 1h13m bisect fix linux-5.15.y OK (0) job log log
2024/05/29 16:54 1h25m bisect fix linux-5.15.y OK (0) job log log

Sample crash report:
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
Mem abort info:
  ESR = 0x0000000086000004
  EC = 0x21: IABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x04: level 0 translation fault
user pgtable: 4k pages, 48-bit VAs, pgdp=000000011bcbc000
[0000000000000000] pgd=0000000000000000, p4d=0000000000000000
Internal error: Oops: 0000000086000004 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 4037 Comm: syz-executor350 Not tainted 5.15.178-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : 0x0
lr : set_page_dirty+0x23c/0x544 mm/page-writeback.c:2631
sp : ffff80001d1a7170
x29: ffff80001d1a7170 x28: ffff0000d9308230 x27: dfff800000000000
x26: 0000000000000000 x25: 1fffff8000712021 x24: dfff800000000000
x23: 0000000000000000 x22: 05ffc00000000007 x21: ffff0000de77e718
x20: ffff800011d565d8 x19: fffffc0003890100 x18: ffff80001d1a69e0
x17: 0000000000000000 x16: ffff800011b4e58c x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
x11: 0000000000000000 x10: 0000000000000000 x9 : ffff0000dd090000
x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000
x5 : ffff0000e2405000 x4 : ffff0000c20f1000 x3 : ffff0000e2404f80
x2 : fffffffffffffff0 x1 : 0000000000000000 x0 : fffffc0003890100
Call trace:
 0x0
 f2fs_update_meta_page+0xa8/0x1f0 fs/f2fs/segment.c:2470
 do_checkpoint+0x1748/0x3754 fs/f2fs/checkpoint.c:1539
 f2fs_write_checkpoint+0x10f4/0x1e3c fs/f2fs/checkpoint.c:1700
 f2fs_issue_checkpoint+0x284/0x3c0
 f2fs_sync_fs+0x1c0/0x4e8 fs/f2fs/super.c:1678
 sync_filesystem+0x1a0/0x218 fs/sync.c:66
 generic_shutdown_super+0x70/0x2f0 fs/super.c:448
 kill_block_super+0x70/0xdc fs/super.c:1427
 kill_f2fs_super+0x268/0x338 fs/f2fs/super.c:4538
 deactivate_locked_super+0xb8/0x13c fs/super.c:335
 deactivate_super+0x108/0x128 fs/super.c:366
 cleanup_mnt+0x3c0/0x474 fs/namespace.c:1143
 __cleanup_mnt+0x20/0x30 fs/namespace.c:1150
 task_work_run+0x130/0x1e4 kernel/task_work.c:188
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 do_notify_resume+0x262c/0x32b8 arch/arm64/kernel/signal.c:946
 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline]
 exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline]
 el0_svc+0xfc/0x1f0 arch/arm64/kernel/entry-common.c:609
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Code: bad PC value
---[ end trace c5343ad9ec3b5e73 ]---

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/02 15:58 linux-5.15.y c16c81c81336 c3901742 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (corrupt fs)] [mounted in repro #2 (corrupt fs)] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page
2026/06/15 13:29 linux-5.15.y dc027a595035 50bb0618 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page
2025/07/15 03:28 linux-5.15.y 89950c454265 03fcfc4b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page
2025/06/03 20:23 linux-5.15.y 98f47d0e9b8c a30356b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page
2025/03/17 20:14 linux-5.15.y 0c935c049b5c ce3352cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page
2024/04/08 10:35 linux-5.15.y 9465fef4ae35 ca620dd8 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page
2025/05/26 15:01 linux-5.15.y 98f47d0e9b8c 874a1386 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page
2025/03/21 16:56 linux-5.15.y 0c935c049b5c 62330552 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page
2025/03/16 06:11 linux-5.15.y 0c935c049b5c e2826670 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page
2025/01/24 14:19 linux-5.15.y 003148680b79 1293872d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel NULL pointer dereference in f2fs_update_meta_page
* Struck through repros no longer work on HEAD.