Oops: general protection fault, probably for non-canonical address 0xdffffc000000000c: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000060-0x0000000000000067] CPU: 0 UID: 0 PID: 176 Comm: kworker/u4:6 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: writeback wb_workfn (flush-7:0) RIP: 0010:f2fs_dev_is_alloc_blocked fs/f2fs/segment.h:956 [inline] RIP: 0010:get_new_segment fs/f2fs/segment.c:2964 [inline] RIP: 0010:new_curseg+0x1134/0x3580 fs/f2fs/segment.c:3110 Code: e8 71 da cc fd 48 8b 7c 24 30 48 8b 07 49 6b cf 70 4c 8d 34 08 49 83 c6 61 4c 89 f0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <0f> b6 04 08 84 c0 0f 85 73 11 00 00 41 80 3e 00 0f 84 e6 00 00 00 RSP: 0018:ffffc900019ee628 EFLAGS: 00010206 RAX: 000000000000000c RBX: 0000000000008000 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000008000 RDI: ffff88803d299a88 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff5200033dcb4 R12: ffff888000260000 R13: 0000000000000004 R14: 0000000000000061 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88808b0a5000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055d4d8cf9e78 CR3: 000000000fb48000 CR4: 0000000000352ef0 Call Trace: f2fs_allocate_data_block+0x229c/0x43c0 fs/f2fs/segment.c:3979 do_write_page+0x13f/0x880 fs/f2fs/segment.c:4099 f2fs_outplace_write_data+0x11a/0x220 fs/f2fs/segment.c:4175 f2fs_write_compressed_pages fs/f2fs/compress.c:1403 [inline] f2fs_write_multi_pages+0x43ae/0x6370 fs/f2fs/compress.c:1602 ---------------- Code disassembly (best guess): 0: e8 71 da cc fd call 0xfdccda76 5: 48 8b 7c 24 30 mov 0x30(%rsp),%rdi a: 48 8b 07 mov (%rdi),%rax d: 49 6b cf 70 imul $0x70,%r15,%rcx 11: 4c 8d 34 08 lea (%rax,%rcx,1),%r14 15: 49 83 c6 61 add $0x61,%r14 19: 4c 89 f0 mov %r14,%rax 1c: 48 c1 e8 03 shr $0x3,%rax 20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx 27: fc ff df * 2a: 0f b6 04 08 movzbl (%rax,%rcx,1),%eax <-- trapping instruction 2e: 84 c0 test %al,%al 30: 0f 85 73 11 00 00 jne 0x11a9 36: 41 80 3e 00 cmpb $0x0,(%r14) 3a: 0f 84 e6 00 00 00 je 0x126