syzbot


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: 354d, last: 7d07h
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 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 26 890d 1094d 0/28 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 8 1259d 1341d 0/28 auto-closed as invalid on 2022/02/13 04:53
Last patch testing requests (3)
Created Duration User Patch Repo Result
2025/02/25 03:37 14m retest repro linux-5.15.y report log
2024/12/16 03:39 12m retest repro linux-5.15.y report log
2024/10/06 21:20 13m 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:
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 0 P4D 0 
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 3534 Comm: syz-executor127 Not tainted 5.15.153-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc90002e676f8 EFLAGS: 00010282
RAX: 1ffffffff152dc4b RBX: ffffea0001bf8900 RCX: ffffffff8a96e258
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffea0001bf8900
RBP: ffffc90002e678f0 R08: ffffffff81ab2159 R09: fffff9400037f121
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88807e046310
R13: 0000000000000001 R14: ffff88807d8bc000 R15: ffff888078e20000
FS:  00005555573aa380(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 000000007d8c8000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 f2fs_update_meta_page+0x45/0x60 fs/f2fs/segment.c:2468
 do_checkpoint+0x1dc5/0x4310 fs/f2fs/checkpoint.c:1539
 f2fs_write_checkpoint+0x126f/0x1b50 fs/f2fs/checkpoint.c:1700
 f2fs_issue_checkpoint+0x2d8/0x4c0 fs/f2fs/checkpoint.c:1861
 sync_filesystem+0x1bc/0x220 fs/sync.c:66
 generic_shutdown_super+0x6e/0x2c0 fs/super.c:448
 kill_block_super+0x7a/0xe0 fs/super.c:1414
 kill_f2fs_super+0x2ff/0x3c0 fs/f2fs/super.c:4539
 deactivate_locked_super+0xa0/0x110 fs/super.c:335
 cleanup_mnt+0x44e/0x500 fs/namespace.c:1143
 task_work_run+0x129/0x1a0 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:175
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301
 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f1eadd03587
Code: 07 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffc1020a528 EFLAGS: 00000206 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f1eadd03587
RDX: 0000000000000000 RSI: 000000000000000a RDI: 00007ffc1020a5e0
RBP: 00007ffc1020a5e0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000206 R12: 00007ffc1020b650
R13: 00005555573ab6c0 R14: 431bde82d7b634db R15: 00007ffc1020b670
 </TASK>
Modules linked in:
CR2: 0000000000000000
---[ end trace 584b94ba3c12e80e ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc90002e676f8 EFLAGS: 00010282
RAX: 1ffffffff152dc4b RBX: ffffea0001bf8900 RCX: ffffffff8a96e258
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffea0001bf8900
RBP: ffffc90002e678f0 R08: ffffffff81ab2159 R09: fffff9400037f121
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88807e046310
R13: 0000000000000001 R14: ffff88807d8bc000 R15: ffff888078e20000
FS:  00005555573aa380(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 000000007d8c8000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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/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
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
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.