syzbot


kernel BUG in do_write_page

Status: upstream: reported on 2025/07/01 07:58
Subsystems: f2fs
[Documentation on labels]
Reported-by: syzbot+9201a61c060513d4be38@syzkaller.appspotmail.com
First crash: 10d, last: 5h32m
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] f2fs: fix to use f2fs_is_valid_blkaddr_raw() in do_write_page() 1 (1) 2025/07/01 09:26
[syzbot] [f2fs?] kernel BUG in do_write_page 1 (3) 2025/07/01 08:34

Sample crash report:
F2FS-fs (loop1): inject invalid blkaddr in f2fs_is_valid_blkaddr of do_write_page+0x277/0xb10 fs/f2fs/segment.c:3956
------------[ cut here ]------------
kernel BUG at fs/f2fs/segment.c:3957!
Oops: invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 0 UID: 0 PID: 5858 Comm: syz-executor Not tainted 6.16.0-rc4-next-20250704-syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:do_write_page+0xa44/0xb10 fs/f2fs/segment.c:3956
Code: 42 34 ad fd 49 89 ed 48 89 e8 48 25 ff 0f 00 00 74 1a e8 4f 2f ad fd e9 9f 00 00 00 e8 45 2f ad fd 90 0f 0b e8 3d 2f ad fd 90 <0f> 0b 4d 89 ee 4c 89 ef be 08 00 00 00 e8 8a ce 11 fe 49 c1 ee 03
RSP: 0018:ffffc900041eec58 EFLAGS: 00010293
RAX: ffffffff84128143 RBX: ffffc900041eef40 RCX: ffff88802b12bc00
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc900041eef5c R08: ffffc900041ee7e7 R09: 1ffff9200083dcfc
R10: dffffc0000000000 R11: fffff5200083dcfd R12: ffff88806aa08000
R13: 1ffff9200083ddeb R14: dffffc0000000000 R15: ffffc900041eef5c
FS:  0000555570919500(0000) GS:ffff888125be7000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff51fc6a000 CR3: 00000000689f8000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 f2fs_outplace_write_data+0x11a/0x220 fs/f2fs/segment.c:4017
 f2fs_do_write_data_page+0x12ea/0x1a40 fs/f2fs/data.c:2752
 f2fs_write_single_data_page+0xa68/0x1680 fs/f2fs/data.c:2851
 f2fs_write_cache_pages fs/f2fs/data.c:3133 [inline]
 __f2fs_write_data_pages fs/f2fs/data.c:3282 [inline]
 f2fs_write_data_pages+0x195b/0x3000 fs/f2fs/data.c:3309
 do_writepages+0x32e/0x550 mm/page-writeback.c:2636
 filemap_fdatawrite_wbc mm/filemap.c:386 [inline]
 __filemap_fdatawrite_range mm/filemap.c:419 [inline]
 __filemap_fdatawrite mm/filemap.c:425 [inline]
 filemap_fdatawrite+0x199/0x240 mm/filemap.c:430
 f2fs_sync_dirty_inodes+0x31f/0x830 fs/f2fs/checkpoint.c:1108
 block_operations fs/f2fs/checkpoint.c:1247 [inline]
 f2fs_write_checkpoint+0x95a/0x1df0 fs/f2fs/checkpoint.c:1638
 kill_f2fs_super+0x2c3/0x6c0 fs/f2fs/super.c:5081
 deactivate_locked_super+0xb9/0x130 fs/super.c:474
 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1378
 task_work_run+0x1d1/0x260 kernel/task_work.c:227
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:43
 exit_to_user_mode_prepare include/linux/irq-entry-common.h:208 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
 do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fddaf58fc57
Code: a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 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 00 f0 ff ff 77 01 c3 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffc622a0af8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 00007fddaf610925 RCX: 00007fddaf58fc57
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffc622a0bb0
RBP: 00007ffc622a0bb0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffc622a1c40
R13: 00007fddaf610925 R14: 0000000000024b4d R15: 00007ffc622a1c80
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:do_write_page+0xa44/0xb10 fs/f2fs/segment.c:3956
Code: 42 34 ad fd 49 89 ed 48 89 e8 48 25 ff 0f 00 00 74 1a e8 4f 2f ad fd e9 9f 00 00 00 e8 45 2f ad fd 90 0f 0b e8 3d 2f ad fd 90 <0f> 0b 4d 89 ee 4c 89 ef be 08 00 00 00 e8 8a ce 11 fe 49 c1 ee 03
RSP: 0018:ffffc900041eec58 EFLAGS: 00010293
RAX: ffffffff84128143 RBX: ffffc900041eef40 RCX: ffff88802b12bc00
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc900041eef5c R08: ffffc900041ee7e7 R09: 1ffff9200083dcfc
R10: dffffc0000000000 R11: fffff5200083dcfd R12: ffff88806aa08000
R13: 1ffff9200083ddeb R14: dffffc0000000000 R15: ffffc900041eef5c
FS:  0000555570919500(0000) GS:ffff888125ce7000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555a62825950 CR3: 00000000689f8000 CR4: 00000000003526f0

Crashes (21):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/07 15:27 linux-next 26ffb3d6f02c 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/07/07 07:27 linux-next 26ffb3d6f02c 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/07/06 23:37 linux-next 26ffb3d6f02c 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/07/03 20:14 linux-next 8d6c58332c7a 115ceea7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/07/03 20:14 linux-next 8d6c58332c7a 115ceea7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/07/03 20:08 linux-next 8d6c58332c7a 115ceea7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/07/03 20:08 linux-next 8d6c58332c7a 115ceea7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/07/01 19:31 linux-next 1343433ed389 ffe4b334 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/07/01 16:39 linux-next 1343433ed389 6e83b42d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/07/01 15:01 linux-next 1343433ed389 6e83b42d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/07/01 15:01 linux-next 1343433ed389 6e83b42d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/07/01 12:14 linux-next 1343433ed389 6e83b42d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/06/30 02:19 linux-next 2aeda9592360 fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/06/29 22:27 linux-next 2aeda9592360 fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/06/29 10:17 linux-next 2aeda9592360 fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/06/29 08:28 linux-next 2aeda9592360 fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/06/29 04:46 linux-next 2aeda9592360 fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/06/28 17:19 linux-next 2aeda9592360 fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/06/27 19:34 linux-next 2aeda9592360 803ce19b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/06/27 19:34 linux-next 2aeda9592360 803ce19b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
2025/06/27 07:55 linux-next ecb259c4f70d 803ce19b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in do_write_page
* Struck through repros no longer work on HEAD.