syz-executor407: attempt to access beyond end of device
loop0: rw=2049, sector=45352, nr_sectors = 128 limit=40427
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 298 Comm: syz-executor407 Not tainted 6.1.115-syzkaller-00006-gc276c53965a8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:f2fs_test_and_set_bit fs/f2fs/f2fs.h:2940 [inline]
RIP: 0010:update_sit_entry+0x5db/0x1020 fs/f2fs/segment.c:2351
Code: 4d 98 48 8d 5c c8 18 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 e2 0e 83 ff 4c 8b 3b 4d 01 e7 4d 89 fc 49 c1 ec 03 <43> 0f b6 04 2c 84 c0 0f 85 d4 08 00 00 41 0f b6 1f 41 89 de 8b 45
RSP: 0018:ffffc90000e06448 EFLAGS: 00010247
RAX: 1ffff1102228f612 RBX: ffff88811147b090 RCX: 000000000000000f
RDX: ffff8881106b2880 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000e064d0 R08: ffffffff8239e5bb R09: ffffffff8239e11e
R10: 0000000000000003 R11: ffff8881106b2880 R12: 0000000000000000
R13: dffffc0000000000 R14: ffff8881103e8000 R15: 0000000000000006
FS: 00007fa307f1d6c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa307efcd58 CR3: 000000012503d000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
f2fs_allocate_data_block+0x1558/0x3ad0 fs/f2fs/segment.c:3368
do_write_page+0x257/0xc30 fs/f2fs/segment.c:3470
f2fs_outplace_write_data+0x1ec/0x460 fs/f2fs/segment.c:3546
f2fs_do_write_data_page+0xf11/0x1670 fs/f2fs/data.c:2799
f2fs_write_single_data_page+0xb4a/0x1c70 fs/f2fs/data.c:2916
f2fs_write_cache_pages fs/f2fs/data.c:3168 [inline]
__f2fs_write_data_pages fs/f2fs/data.c:3318 [inline]
f2fs_write_data_pages+0x1676/0x2af0 fs/f2fs/data.c:3345
do_writepages+0x385/0x620 mm/page-writeback.c:2494
filemap_fdatawrite_wbc+0x153/0x1b0 mm/filemap.c:408
__filemap_fdatawrite_range mm/filemap.c:441 [inline]
filemap_write_and_wait_range+0x1a4/0x290 mm/filemap.c:694
f2fs_flush_buffered_write fs/f2fs/file.c:4705 [inline]
f2fs_file_write_iter+0x785/0x27c0 fs/f2fs/file.c:4905
do_iter_write+0x6e6/0xc40 fs/read_write.c:861
vfs_iter_write+0x7c/0xa0 fs/read_write.c:902
iter_file_splice_write+0x7f8/0xf90 fs/splice.c:685
do_splice_from fs/splice.c:763 [inline]
direct_splice_actor+0xff/0x130 fs/splice.c:930
splice_direct_to_actor+0x4b4/0xbb0 fs/splice.c:885
do_splice_direct+0x27f/0x3c0 fs/splice.c:973
do_sendfile+0x613/0xfe0 fs/read_write.c:1255
__do_sys_sendfile64 fs/read_write.c:1323 [inline]
__se_sys_sendfile64 fs/read_write.c:1309 [inline]
__x64_sys_sendfile64+0x1ce/0x230 fs/read_write.c:1309
x64_sys_call+0x140/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:41
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fa307f60289
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa307f1d218 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007fa307fec608 RCX: 00007fa307f60289
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000005
RBP: 00007fa307fec600 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000fffe80 R11: 0000000000000246 R12: 00007fa307fb9824
R13: 0031656c69662f2e R14: 00007fa307fb4100 R15: 00007fa307fb4310
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:f2fs_test_and_set_bit fs/f2fs/f2fs.h:2940 [inline]
RIP: 0010:update_sit_entry+0x5db/0x1020 fs/f2fs/segment.c:2351
Code: 4d 98 48 8d 5c c8 18 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 e2 0e 83 ff 4c 8b 3b 4d 01 e7 4d 89 fc 49 c1 ec 03 <43> 0f b6 04 2c 84 c0 0f 85 d4 08 00 00 41 0f b6 1f 41 89 de 8b 45
RSP: 0018:ffffc90000e06448 EFLAGS: 00010247
RAX: 1ffff1102228f612 RBX: ffff88811147b090 RCX: 000000000000000f
RDX: ffff8881106b2880 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000e064d0 R08: ffffffff8239e5bb R09: ffffffff8239e11e
R10: 0000000000000003 R11: ffff8881106b2880 R12: 0000000000000000
R13: dffffc0000000000 R14: ffff8881103e8000 R15: 0000000000000006
FS: 00007fa307f1d6c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa307efcd58 CR3: 000000012503d000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 4d 98 rex.WRB cltq
2: 48 8d 5c c8 18 lea 0x18(%rax,%rcx,8),%rbx
7: 48 89 d8 mov %rbx,%rax
a: 48 c1 e8 03 shr $0x3,%rax
e: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
13: 74 08 je 0x1d
15: 48 89 df mov %rbx,%rdi
18: e8 e2 0e 83 ff call 0xff830eff
1d: 4c 8b 3b mov (%rbx),%r15
20: 4d 01 e7 add %r12,%r15
23: 4d 89 fc mov %r15,%r12
26: 49 c1 ec 03 shr $0x3,%r12
* 2a: 43 0f b6 04 2c movzbl (%r12,%r13,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 0f 85 d4 08 00 00 jne 0x90b
37: 41 0f b6 1f movzbl (%r15),%ebx
3b: 41 89 de mov %ebx,%r14d
3e: 8b .byte 0x8b
3f: 45 rex.RB