================================================================== 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/482 CPU: 1 PID: 482 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/0x30 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 __kasan_report mm/kasan/report.c:431 [inline] kasan_report+0xe7/0x140 mm/kasan/report.c:444 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+0x11aa/0x1bb0 fs/f2fs/file.c:381 f2fs_ioc_commit_atomic_write fs/f2fs/file.c:2210 [inline] __f2fs_ioctl+0x31ac/0xb580 fs/f2fs/file.c:4225 f2fs_ioctl+0x149/0x240 fs/f2fs/file.c:4313 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0x121/0x1a0 fs/ioctl.c:860 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:860 x64_sys_call+0x2f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f62aba90539 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:00007f62ab8f5028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f62abcfbfa0 RCX: 00007f62aba90539 RDX: 0000000000000000 RSI: 000000000000f502 RDI: 0000000000000005 RBP: 00007f62abb23ee0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f62abcfc038 R14: 00007f62abcfbfa0 R15: 00007ffd5eca5e58 ================================================================== BUG: kernel NULL pointer dereference, address: 0000000000000024 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 116b76067 P4D 116b76067 PUD 0 Oops: 0002 [#1] PREEMPT SMP KASAN CPU: 0 PID: 482 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/linux/atomic/atomic-instrumented.h:182 [inline] RIP: 0010:f2fs_issue_flush+0x172/0x8b0 fs/f2fs/segment.c:595 Code: 03 52 ff 4c 89 64 24 28 49 83 c4 24 4c 89 e7 be 04 00 00 00 e8 7f 2c 91 ff 81 e3 00 04 00 00 0f 85 52 01 00 00 4c 89 64 24 08 41 ff 04 24 4c 8b 74 24 20 4d 8d ae 3c 0c 00 00 4d 89 ec 49 c1 RSP: 0018:ffffc900020576c0 EFLAGS: 00010246 RAX: ffff8881186f4f00 RBX: 0000000000000000 RCX: ffff8881186f4f00 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff RBP: ffffc900020577d0 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffffbfff0e18a4c R12: 0000000000000024 R13: ffffc90002057720 R14: 0000000000000000 R15: 1ffff9200040aee0 FS: 00007f62ab8f56c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000024 CR3: 0000000112c00000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: f2fs_do_sync_file+0x11aa/0x1bb0 fs/f2fs/file.c:381 f2fs_ioc_commit_atomic_write fs/f2fs/file.c:2210 [inline] __f2fs_ioctl+0x31ac/0xb580 fs/f2fs/file.c:4225 f2fs_ioctl+0x149/0x240 fs/f2fs/file.c:4313 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0x121/0x1a0 fs/ioctl.c:860 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:860 x64_sys_call+0x2f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f62aba90539 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:00007f62ab8f5028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f62abcfbfa0 RCX: 00007f62aba90539 RDX: 0000000000000000 RSI: 000000000000f502 RDI: 0000000000000005 RBP: 00007f62abb23ee0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f62abcfc038 R14: 00007f62abcfbfa0 R15: 00007ffd5eca5e58 Modules linked in: CR2: 0000000000000024 ---[ end trace bf949ca981f9b737 ]--- RIP: 0010:arch_atomic_inc fs/f2fs/segment.c:-1 [inline] RIP: 0010:atomic_inc include/linux/atomic/atomic-instrumented.h:182 [inline] RIP: 0010:f2fs_issue_flush+0x172/0x8b0 fs/f2fs/segment.c:595 Code: 03 52 ff 4c 89 64 24 28 49 83 c4 24 4c 89 e7 be 04 00 00 00 e8 7f 2c 91 ff 81 e3 00 04 00 00 0f 85 52 01 00 00 4c 89 64 24 08 41 ff 04 24 4c 8b 74 24 20 4d 8d ae 3c 0c 00 00 4d 89 ec 49 c1 RSP: 0018:ffffc900020576c0 EFLAGS: 00010246 RAX: ffff8881186f4f00 RBX: 0000000000000000 RCX: ffff8881186f4f00 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff RBP: ffffc900020577d0 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffffbfff0e18a4c R12: 0000000000000024 R13: ffffc90002057720 R14: 0000000000000000 R15: 1ffff9200040aee0 FS: 00007f62ab8f56c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000024 CR3: 0000000112c00000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 03 52 ff add -0x1(%rdx),%edx 3: 4c 89 64 24 28 mov %r12,0x28(%rsp) 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 7f 2c 91 ff call 0xff912c98 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 3c 0c 00 00 lea 0xc3c(%r14),%r13 3b: 4d 89 ec mov %r13,%r12 3e: 49 rex.WB 3f: c1 .byte 0xc1