==================================================================
BUG: KASAN: null-ptr-deref in f2fs_issue_flush+0x157/0x8b0 fs/f2fs/segment.c:-1
Write of size 4 at addr 0000000000000024 by task syz.2.17/372
CPU: 0 PID: 372 Comm: syz.2.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
<TASK>
__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+0xcc/0x150 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+0x157/0x8b0 fs/f2fs/segment.c:-1
f2fs_do_sync_file+0x11ae/0x1b70 fs/f2fs/file.c:384
f2fs_sync_file+0x103/0x150 fs/f2fs/file.c:400
vfs_fsync_range+0x171/0x180 fs/sync.c:188
generic_write_sync include/linux/fs.h:3038 [inline]
f2fs_file_write_iter+0x60d/0x29f0 fs/f2fs/file.c:4826
call_write_iter include/linux/fs.h:2212 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x831/0xfd0 fs/read_write.c:594
ksys_write+0x14a/0x260 fs/read_write.c:647
__do_sys_write fs/read_write.c:659 [inline]
__se_sys_write fs/read_write.c:656 [inline]
__x64_sys_write+0x7b/0x90 fs/read_write.c:656
x64_sys_call+0x8ef/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2
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:0x7f3880aa0e59
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:00007ffdbd69db78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f3880d19fa0 RCX: 00007f3880aa0e59
RDX: 000000000208e24b RSI: 0000200000000000 RDI: 0000000000000005
RBP: 00007f3880b36e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f3880d19fac R14: 00007f3880d19fa0 R15: 00007f3880d19fa0
</TASK>
==================================================================
BUG: kernel NULL pointer dereference, address: 0000000000000024
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 12cac5067 P4D 12cac5067 PUD 0
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 372 Comm: syz.2.17 Tainted: G B syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
RIP: 0010:arch_atomic_inc fs/f2fs/segment.c:594 [inline]
RIP: 0010:atomic_inc include/linux/atomic/atomic-instrumented.h:182 [inline]
RIP: 0010:f2fs_issue_flush+0x163/0x8b0 fs/f2fs/segment.c:595
Code: 00 31 ff e8 cf c5 51 ff 4c 89 6c 24 10 49 83 c5 24 4c 89 ef be 04 00 00 00 e8 a9 34 91 ff 81 e3 00 04 00 00 0f 85 51 01 00 00 <f0> 41 ff 45 00 4d 8d b7 3c 0c 00 00 4d 89 f5 49 c1 ed 03 48 b8 00
RSP: 0018:ffffc90000c17620 EFLAGS: 00010246
RAX: ffff888110e66200 RBX: 0000000000000000 RCX: ffff888110e662c0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90000c17730 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0e18c4c R12: 1ffff92000182ecc
R13: 0000000000000024 R14: ffffc90000c17680 R15: ffff88811143c000
FS: 000055556fbcd500(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000024 CR3: 00000001222b1000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
f2fs_do_sync_file+0x11ae/0x1b70 fs/f2fs/file.c:384
f2fs_sync_file+0x103/0x150 fs/f2fs/file.c:400
vfs_fsync_range+0x171/0x180 fs/sync.c:188
generic_write_sync include/linux/fs.h:3038 [inline]
f2fs_file_write_iter+0x60d/0x29f0 fs/f2fs/file.c:4826
call_write_iter include/linux/fs.h:2212 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x831/0xfd0 fs/read_write.c:594
ksys_write+0x14a/0x260 fs/read_write.c:647
__do_sys_write fs/read_write.c:659 [inline]
__se_sys_write fs/read_write.c:656 [inline]
__x64_sys_write+0x7b/0x90 fs/read_write.c:656
x64_sys_call+0x8ef/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2
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:0x7f3880aa0e59
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:00007ffdbd69db78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f3880d19fa0 RCX: 00007f3880aa0e59
RDX: 000000000208e24b RSI: 0000200000000000 RDI: 0000000000000005
RBP: 00007f3880b36e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f3880d19fac R14: 00007f3880d19fa0 R15: 00007f3880d19fa0
</TASK>
Modules linked in:
CR2: 0000000000000024
---[ end trace 269845b78b3bcf24 ]---
RIP: 0010:arch_atomic_inc fs/f2fs/segment.c:594 [inline]
RIP: 0010:atomic_inc include/linux/atomic/atomic-instrumented.h:182 [inline]
RIP: 0010:f2fs_issue_flush+0x163/0x8b0 fs/f2fs/segment.c:595
Code: 00 31 ff e8 cf c5 51 ff 4c 89 6c 24 10 49 83 c5 24 4c 89 ef be 04 00 00 00 e8 a9 34 91 ff 81 e3 00 04 00 00 0f 85 51 01 00 00 <f0> 41 ff 45 00 4d 8d b7 3c 0c 00 00 4d 89 f5 49 c1 ed 03 48 b8 00
RSP: 0018:ffffc90000c17620 EFLAGS: 00010246
RAX: ffff888110e66200 RBX: 0000000000000000 RCX: ffff888110e662c0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90000c17730 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0e18c4c R12: 1ffff92000182ecc
R13: 0000000000000024 R14: ffffc90000c17680 R15: ffff88811143c000
FS: 000055556fbcd500(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000024 CR3: 00000001222b1000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 00 31 add %dh,(%rcx)
2: ff ljmp (bad)
3: e8 cf c5 51 ff call 0xff51c5d7
8: 4c 89 6c 24 10 mov %r13,0x10(%rsp)
d: 49 83 c5 24 add $0x24,%r13
11: 4c 89 ef mov %r13,%rdi
14: be 04 00 00 00 mov $0x4,%esi
19: e8 a9 34 91 ff call 0xff9134c7
1e: 81 e3 00 04 00 00 and $0x400,%ebx
24: 0f 85 51 01 00 00 jne 0x17b
* 2a: f0 41 ff 45 00 lock incl 0x0(%r13) <-- trapping instruction
2f: 4d 8d b7 3c 0c 00 00 lea 0xc3c(%r15),%r14
36: 4d 89 f5 mov %r14,%r13
39: 49 c1 ed 03 shr $0x3,%r13
3d: 48 rex.W
3e: b8 .byte 0xb8