================================================================== 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.0.31/477 CPU: 1 PID: 477 Comm: syz.0.31 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 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+0x190/0x1a0 fs/sync.c:202 generic_write_sync include/linux/fs.h:2920 [inline] f2fs_file_write_iter+0x6d9/0x27a0 fs/f2fs/file.c:4933 __kernel_write+0x535/0x910 fs/read_write.c:550 dump_emit+0x246/0x370 fs/coredump.c:855 elf_core_dump+0x24a5/0x2cc0 fs/binfmt_elf.c:2242 do_coredump+0x1ba3/0x28e0 fs/coredump.c:817 get_signal+0xf23/0x12e0 kernel/signal.c:2779 arch_do_signal_or_restart+0xe2/0x11d0 arch/x86/kernel/signal.c:805 handle_signal_work kernel/entry/common.c:145 [inline] exit_to_user_mode_loop+0xa2/0xe0 kernel/entry/common.c:169 exit_to_user_mode_prepare+0x76/0xa0 kernel/entry/common.c:199 irqentry_exit_to_user_mode+0x9/0x10 kernel/entry/common.c:287 irqentry_exit+0x12/0x60 kernel/entry/common.c:375 exc_general_protection+0x1ca/0x250 arch/x86/kernel/traps.c:557 asm_exc_general_protection+0x1e/0x30 arch/x86/include/asm/idtentry.h:565 RIP: 0033:0x7f4aa6406e61 Code: 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 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f RSP: 002b:0000200000000050 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007f4aa667ffa0 RCX: 00007f4aa6406e59 RDX: 0000200000000080 RSI: 0000200000000050 RDI: 00000000c01c0200 RBP: 00007f4aa649cd6f R08: 0000200000000100 R09: 0000200000000100 R10: 00002000000000c0 R11: 0000000000000206 R12: 0000000000000000 R13: 00007f4aa6680038 R14: 00007f4aa667ffa0 R15: 00007ffc39b34738 ================================================================== BUG: kernel NULL pointer dereference, address: 0000000000000024 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP KASAN CPU: 0 PID: 477 Comm: syz.0.31 Tainted: G B syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 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: 44 58 ff 4c 89 64 24 28 49 83 c4 24 4c 89 e7 be 04 00 00 00 e8 ef c4 92 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 6c 0c 00 00 4d 89 ec 49 c1 RSP: 0018:ffffc90001206b40 EFLAGS: 00010246 RAX: ffff888114c0a700 RBX: 0000000000000000 RCX: 0000000000000282 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff RBP: ffffc90001206c50 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffffbfff0dcfa48 R12: 0000000000000024 R13: ffffc90001206ba0 R14: 0000000000000000 R15: 1ffff92000240d70 FS: 0000200000000100(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000024 CR3: 0000000114c8c000 CR4: 00000000003526b0 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+0x190/0x1a0 fs/sync.c:202 generic_write_sync include/linux/fs.h:2920 [inline] f2fs_file_write_iter+0x6d9/0x27a0 fs/f2fs/file.c:4933 __kernel_write+0x535/0x910 fs/read_write.c:550 dump_emit+0x246/0x370 fs/coredump.c:855 elf_core_dump+0x24a5/0x2cc0 fs/binfmt_elf.c:2242 do_coredump+0x1ba3/0x28e0 fs/coredump.c:817 get_signal+0xf23/0x12e0 kernel/signal.c:2779 arch_do_signal_or_restart+0xe2/0x11d0 arch/x86/kernel/signal.c:805 handle_signal_work kernel/entry/common.c:145 [inline] exit_to_user_mode_loop+0xa2/0xe0 kernel/entry/common.c:169 exit_to_user_mode_prepare+0x76/0xa0 kernel/entry/common.c:199 irqentry_exit_to_user_mode+0x9/0x10 kernel/entry/common.c:287 irqentry_exit+0x12/0x60 kernel/entry/common.c:375 exc_general_protection+0x1ca/0x250 arch/x86/kernel/traps.c:557 asm_exc_general_protection+0x1e/0x30 arch/x86/include/asm/idtentry.h:565 RIP: 0033:0x7f4aa6406e61 Code: 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 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f RSP: 002b:0000200000000050 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007f4aa667ffa0 RCX: 00007f4aa6406e59 RDX: 0000200000000080 RSI: 0000200000000050 RDI: 00000000c01c0200 RBP: 00007f4aa649cd6f R08: 0000200000000100 R09: 0000200000000100 R10: 00002000000000c0 R11: 0000000000000206 R12: 0000000000000000 R13: 00007f4aa6680038 R14: 00007f4aa667ffa0 R15: 00007ffc39b34738 Modules linked in: CR2: 0000000000000024 ---[ end trace f9a26a49062ec56e ]--- 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: 44 58 ff 4c 89 64 24 28 49 83 c4 24 4c 89 e7 be 04 00 00 00 e8 ef c4 92 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 6c 0c 00 00 4d 89 ec 49 c1 RSP: 0018:ffffc90001206b40 EFLAGS: 00010246 RAX: ffff888114c0a700 RBX: 0000000000000000 RCX: 0000000000000282 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff RBP: ffffc90001206c50 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffffbfff0dcfa48 R12: 0000000000000024 R13: ffffc90001206ba0 R14: 0000000000000000 R15: 1ffff92000240d70 FS: 0000200000000100(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000024 CR3: 0000000114c8c000 CR4: 00000000003526b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 44 58 rex.R pop %rax 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 ef c4 92 ff call 0xff92c508 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