syzbot


KASAN: null-ptr-deref Write in f2fs_issue_flush

Status: upstream: reported C repro on 2025/11/09 06:59
Reported-by: syzbot+f3175bdf7b93966197b4@syzkaller.appspotmail.com
First crash: 115d, last: 7d10h
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 KASAN: null-ptr-deref Write in f2fs_issue_flush origin:lts 12 C error 6 19d 154d 0/2 upstream: reported C repro on 2025/09/30 19:35
linux-6.1 KASAN: null-ptr-deref Write in f2fs_issue_flush origin:lts-only 12 C error 3 50d 154d 0/3 upstream: reported C repro on 2025/10/01 01:02
Last patch testing requests (8)
Created Duration User Patch Repo Result
2026/02/24 21:49 5m retest repro android13-5.10-lts report log
2026/02/08 05:00 6m retest repro android13-5.10-lts report log
2026/02/08 05:00 5m retest repro android13-5.10-lts report log
2026/02/08 05:00 7m retest repro android13-5.10-lts report log
2025/11/25 22:59 9m retest repro android13-5.10-lts report log
2025/11/25 22:59 11m retest repro android13-5.10-lts report log
2025/11/25 22:59 12m retest repro android13-5.10-lts report log
2025/11/25 22:59 9m retest repro android13-5.10-lts report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2026/01/25 04:05 38m bisect fix android13-5.10-lts OK (0) job log log
2025/12/26 01:51 2h14m bisect fix android13-5.10-lts OK (0) job log log

Sample crash report:
WARNING: the mand mount option is being deprecated and
         will be removed in v5.15!
======================================================
F2FS-fs (loop2): Try to recover all the superblocks, ret: 0
==================================================================
BUG: KASAN: null-ptr-deref in f2fs_issue_flush+0x161/0x8b0 fs/f2fs/segment.c:-1
Write of size 4 at addr 0000000000000024 by task syz.2.17/357

CPU: 0 PID: 357 Comm: syz.2.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 __dump_stack+0x21/0x24 lib/dump_stack.c:77
 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118
 __kasan_report mm/kasan/report.c:439 [inline]
 kasan_report+0xd8/0x130 mm/kasan/report.c:452
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x249/0x2a0 mm/kasan/generic.c:189
 __kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37
 f2fs_issue_flush+0x161/0x8b0 fs/f2fs/segment.c:-1
 f2fs_do_sync_file+0x1325/0x1d80 fs/f2fs/file.c:385
 f2fs_sync_file+0x103/0x150 fs/f2fs/file.c:401
 vfs_fsync_range fs/sync.c:202 [inline]
 vfs_fsync+0x18d/0x1a0 fs/sync.c:216
 __loop_update_dio+0x260/0x610 drivers/block/loop.c:212
 loop_update_dio drivers/block/loop.c:638 [inline]
 loop_configure+0xbf5/0x1250 drivers/block/loop.c:1160
 lo_ioctl+0xa9a/0x1f60 drivers/block/loop.c:1697
 __blkdev_driver_ioctl block/ioctl.c:240 [inline]
 blkdev_ioctl+0x2db/0x640 block/ioctl.c:635
 block_ioctl+0xae/0x100 fs/block_dev.c:1888
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl+0x121/0x1a0 fs/ioctl.c:739
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:739
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f39bfbb2f79
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffe8190e08 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f39bfe2cfa0 RCX: 00007f39bfbb2f79
RDX: 00002000000002c0 RSI: 0000000000004c0a RDI: 0000000000000003
RBP: 00007f39bfc497e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f39bfe2cfac R14: 00007f39bfe2cfa0 R15: 00007f39bfe2cfa0
==================================================================
BUG: kernel NULL pointer dereference, address: 0000000000000024
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 10fe4c067 P4D 10fe4c067 PUD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 357 Comm: syz.2.17 Tainted: G    B             syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:arch_atomic_inc fs/f2fs/segment.c:-1 [inline]
RIP: 0010:atomic_inc include/asm-generic/atomic-instrumented.h:241 [inline]
RIP: 0010:f2fs_issue_flush+0x172/0x8b0 fs/f2fs/segment.c:678
Code: 4b 58 ff 4c 89 64 24 28 49 83 c4 24 4c 89 e7 be 04 00 00 00 e8 1f cb 92 ff 81 e3 00 04 00 00 0f 85 52 01 00 00 4c 89 64 24 08 <f0> 41 ff 04 24 4c 8b 74 24 20 4d 8d ae 6c 0c 00 00 4d 89 ec 49 c1
RSP: 0018:ffffc90000ca6ec0 EFLAGS: 00010246
RAX: ffff88810cd12700 RBX: 0000000000000000 RCX: 0000000000000286
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90000ca6fd0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0dcf448 R12: 0000000000000024
R13: ffffc90000ca6f20 R14: 0000000000000000 R15: 1ffff92000194de0
FS:  000055555b2df500(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000024 CR3: 000000010ce50000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 f2fs_do_sync_file+0x1325/0x1d80 fs/f2fs/file.c:385
 f2fs_sync_file+0x103/0x150 fs/f2fs/file.c:401
 vfs_fsync_range fs/sync.c:202 [inline]
 vfs_fsync+0x18d/0x1a0 fs/sync.c:216
 __loop_update_dio+0x260/0x610 drivers/block/loop.c:212
 loop_update_dio drivers/block/loop.c:638 [inline]
 loop_configure+0xbf5/0x1250 drivers/block/loop.c:1160
 lo_ioctl+0xa9a/0x1f60 drivers/block/loop.c:1697
 __blkdev_driver_ioctl block/ioctl.c:240 [inline]
 blkdev_ioctl+0x2db/0x640 block/ioctl.c:635
 block_ioctl+0xae/0x100 fs/block_dev.c:1888
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl+0x121/0x1a0 fs/ioctl.c:739
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:739
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f39bfbb2f79
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffe8190e08 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f39bfe2cfa0 RCX: 00007f39bfbb2f79
RDX: 00002000000002c0 RSI: 0000000000004c0a RDI: 0000000000000003
RBP: 00007f39bfc497e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f39bfe2cfac R14: 00007f39bfe2cfa0 R15: 00007f39bfe2cfa0
Modules linked in:
CR2: 0000000000000024
---[ end trace 974f4c9c2442fec6 ]---
RIP: 0010:arch_atomic_inc fs/f2fs/segment.c:-1 [inline]
RIP: 0010:atomic_inc include/asm-generic/atomic-instrumented.h:241 [inline]
RIP: 0010:f2fs_issue_flush+0x172/0x8b0 fs/f2fs/segment.c:678
Code: 4b 58 ff 4c 89 64 24 28 49 83 c4 24 4c 89 e7 be 04 00 00 00 e8 1f cb 92 ff 81 e3 00 04 00 00 0f 85 52 01 00 00 4c 89 64 24 08 <f0> 41 ff 04 24 4c 8b 74 24 20 4d 8d ae 6c 0c 00 00 4d 89 ec 49 c1
RSP: 0018:ffffc90000ca6ec0 EFLAGS: 00010246
RAX: ffff88810cd12700 RBX: 0000000000000000 RCX: 0000000000000286
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90000ca6fd0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0dcf448 R12: 0000000000000024
R13: ffffc90000ca6f20 R14: 0000000000000000 R15: 1ffff92000194de0
FS:  000055555b2df500(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000024 CR3: 000000010ce50000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	4b 58                	rex.WXB pop %r8
   2:	ff 4c 89 64          	decl   0x64(%rcx,%rcx,4)
   6:	24 28                	and    $0x28,%al
   8:	49 83 c4 24          	add    $0x24,%r12
   c:	4c 89 e7             	mov    %r12,%rdi
   f:	be 04 00 00 00       	mov    $0x4,%esi
  14:	e8 1f cb 92 ff       	call   0xff92cb38
  19:	81 e3 00 04 00 00    	and    $0x400,%ebx
  1f:	0f 85 52 01 00 00    	jne    0x177
  25:	4c 89 64 24 08       	mov    %r12,0x8(%rsp)
* 2a:	f0 41 ff 04 24       	lock incl (%r12) <-- trapping instruction
  2f:	4c 8b 74 24 20       	mov    0x20(%rsp),%r14
  34:	4d 8d ae 6c 0c 00 00 	lea    0xc6c(%r14),%r13
  3b:	4d 89 ec             	mov    %r13,%r12
  3e:	49                   	rex.WB
  3f:	c1                   	.byte 0xc1

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/10 18:34 android13-5.10-lts 0be127d3b2ec 91d776d3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 KASAN: null-ptr-deref Write in f2fs_issue_flush
2025/11/11 21:18 android13-5.10-lts ab3e1c0dd1ff 4e1406b4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 KASAN: null-ptr-deref Write in f2fs_issue_flush
2025/11/11 18:27 android13-5.10-lts ab3e1c0dd1ff 4e1406b4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 KASAN: null-ptr-deref Write in f2fs_issue_flush
2025/11/09 07:10 android13-5.10-lts ab3e1c0dd1ff 4e1406b4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 KASAN: null-ptr-deref Write in f2fs_issue_flush
2025/11/09 06:50 android13-5.10-lts ab3e1c0dd1ff 4e1406b4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 KASAN: null-ptr-deref Write in f2fs_issue_flush
2025/11/09 06:29 android13-5.10-lts ab3e1c0dd1ff 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in f2fs_issue_flush
* Struck through repros no longer work on HEAD.