general protection fault: 0000 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 0 PID: 10723 Comm: syz-executor.0 Not tainted 4.14.302-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 task: ffff88809a9b6440 task.stack: ffff888054510000 RIP: 0010:f2fs_test_and_set_bit fs/f2fs/f2fs.h:1956 [inline] RIP: 0010:update_sit_entry+0x684/0x1560 fs/f2fs/segment.c:1682 RSP: 0018:ffff888054516980 EFLAGS: 00010207 RAX: dffffc0000000000 RBX: ffff88805531c9c0 RCX: 0000000000000080 RDX: 0000000000000006 RSI: 1ffff1101405941c RDI: ffff888054c4a720 RBP: ffff888054c4a700 R08: ffff888054d98ec0 R09: ffffed100aa77729 R10: ffff8880553bb94e R11: ffff88809a9b6440 R12: 0000000000000037 R13: 0000000000000080 R14: 0000000000000037 R15: 0000000000000001 FS: 00007fe6269e6700(0000) GS:ffff8880ba400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f4dc8504265 CR3: 00000000a5039000 CR4: 00000000003406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: refresh_sit_entry+0x2c/0x730 fs/f2fs/segment.c:1728 allocate_data_block+0x47d/0xf60 fs/f2fs/segment.c:2372 do_write_page+0x222/0x7f0 fs/f2fs/segment.c:2402 write_data_page+0x15d/0x3a0 fs/f2fs/segment.c:2456 do_write_data_page+0xc63/0x2ca0 fs/f2fs/data.c:1493 __write_data_page+0xea2/0x1480 fs/f2fs/data.c:1586 f2fs_write_cache_pages+0x40d/0xe50 fs/f2fs/data.c:1744 __f2fs_write_data_pages+0x2e2/0xb90 fs/f2fs/data.c:1838 do_writepages+0xc3/0x240 mm/page-writeback.c:2361 __filemap_fdatawrite_range+0x236/0x310 mm/filemap.c:346 file_write_and_wait_range+0x86/0xd0 mm/filemap.c:678 f2fs_do_sync_file+0x2b1/0x1920 fs/f2fs/file.c:214 vfs_fsync_range+0x103/0x260 fs/sync.c:196 generic_write_sync include/linux/fs.h:2684 [inline] f2fs_file_write_iter+0x4a6/0x600 fs/f2fs/file.c:2753 call_write_iter include/linux/fs.h:1780 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x44c/0x630 fs/read_write.c:482 __kernel_write+0xf5/0x330 fs/read_write.c:501 dump_emit+0x153/0x280 fs/coredump.c:806 elf_core_dump+0x2e27/0x4410 fs/binfmt_elf.c:2365 do_coredump+0x1a43/0x29f0 fs/coredump.c:770 get_signal+0xc9f/0x1ca0 kernel/signal.c:2406 do_signal+0x7c/0x1550 arch/x86/kernel/signal.c:792 exit_to_usermode_loop+0x160/0x200 arch/x86/entry/common.c:160 prepare_exit_to_usermode+0x1af/0x210 arch/x86/entry/common.c:199 retint_user+0x8/0x18 RIP: 0033:0x7fe6284740e1 RSP: 002b:0000000020000490 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007fe628593f80 RCX: 00007fe6284740d9 RDX: 0000000020000140 RSI: 0000000020000490 RDI: 0000000008000000 RBP: 00007fe6284cfae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000180 R11: 0000000000000206 R12: 0000000000000000 R13: 00007ffdfaf639ff R14: 00007fe6269e6300 R15: 0000000000022000 Code: ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 6c 0e 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 75 20 4d 01 e6 4c 89 f2 48 c1 ea 03 <0f> b6 04 02 4c 89 f2 83 e2 07 38 d0 7f 08 84 c0 0f 85 57 0e 00 RIP: f2fs_test_and_set_bit fs/f2fs/f2fs.h:1956 [inline] RSP: ffff888054516980 RIP: update_sit_entry+0x684/0x1560 fs/f2fs/segment.c:1682 RSP: ffff888054516980 block nbd4: Attempted send on invalid socket print_req_error: I/O error, dev nbd4, sector 128 gfs2: error 10 reading superblock block nbd4: Attempted send on invalid socket print_req_error: I/O error, dev nbd4, sector 128 gfs2: error 10 reading superblock block nbd4: Attempted send on invalid socket print_req_error: I/O error, dev nbd4, sector 128 gfs2: error 10 reading superblock block nbd4: Attempted send on invalid socket print_req_error: I/O error, dev nbd4, sector 128 gfs2: error 10 reading superblock ---[ end trace 4df4b3a8818a80f0 ]--- ---------------- Code disassembly (best guess), 1 bytes skipped: 0: df 48 89 fisttps -0x77(%rax) 3: fa cli 4: 48 c1 ea 03 shr $0x3,%rdx 8: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) c: 0f 85 6c 0e 00 00 jne 0xe7e 12: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 19: fc ff df 1c: 4c 8b 75 20 mov 0x20(%rbp),%r14 20: 4d 01 e6 add %r12,%r14 23: 4c 89 f2 mov %r14,%rdx 26: 48 c1 ea 03 shr $0x3,%rdx * 2a: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax <-- trapping instruction 2e: 4c 89 f2 mov %r14,%rdx 31: 83 e2 07 and $0x7,%edx 34: 38 d0 cmp %dl,%al 36: 7f 08 jg 0x40 38: 84 c0 test %al,%al 3a: 0f .byte 0xf 3b: 85 57 0e test %edx,0xe(%rdi)