nvmet: adding nsid 1 to subsystem testnqn Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 UID: 0 PID: 5323 Comm: syz.0.0 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 RIP: 0010:strlen+0x29/0x70 lib/string.c:402 Code: 90 f3 0f 1e fa 41 57 41 56 41 54 53 48 c7 c0 ff ff ff ff 49 be 00 00 00 00 00 fc ff df 48 89 fb 49 89 c7 48 89 d8 48 c1 e8 03 <42> 0f b6 04 30 84 c0 75 11 48 ff c3 49 8d 47 01 42 80 7c 3f 01 00 RSP: 0018:ffffc9000e00f978 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000100000 RDX: ffffc9000ee22000 RSI: 000000000000004c RDI: 0000000000000000 RBP: ffffc9000e00fab8 R08: ffffffff9057c737 R09: 1ffffffff20af8e6 R10: dffffc0000000000 R11: fffffbfff20af8e7 R12: 1ffff92001c01f40 R13: dffffc0000000000 R14: dffffc0000000000 R15: ffffffffffffffff FS: 00007ffbe88d86c0(0000) GS:ffff88808c540000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd997a30a0 CR3: 0000000012133000 CR4: 0000000000352ef0 Call Trace: __fortify_strlen include/linux/fortify-string.h:218 [inline] do_getname_kernel+0x1d/0x230 fs/namei.c:260 class_filename_kernel_constructor include/linux/fs.h:2565 [inline] filp_open+0x87/0x1d0 fs/open.c:1342 nvmet_file_ns_enable+0x74/0x350 drivers/nvme/target/io-cmd-file.c:41 nvmet_ns_enable+0xaa/0x780 drivers/nvme/target/core.c:596 nvmet_ns_enable_store+0xd7/0x170 drivers/nvme/target/configfs.c:735 flush_write_buffer fs/configfs/file.c:207 [inline] configfs_write_iter+0x337/0x430 fs/configfs/file.c:229 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x612/0xba0 fs/read_write.c:687 ksys_write+0x150/0x270 fs/read_write.c:739 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ffbe799e0d9 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:00007ffbe88d7fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ffbe7c25fa0 RCX: 00007ffbe799e0d9 RDX: 0000000000000001 RSI: 0000200000000580 RDI: 0000000000000004 RBP: 00007ffbe7a35024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffbe7c26038 R14: 00007ffbe7c25fa0 R15: 00007ffdb3242ba8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:strlen+0x29/0x70 lib/string.c:402 Code: 90 f3 0f 1e fa 41 57 41 56 41 54 53 48 c7 c0 ff ff ff ff 49 be 00 00 00 00 00 fc ff df 48 89 fb 49 89 c7 48 89 d8 48 c1 e8 03 <42> 0f b6 04 30 84 c0 75 11 48 ff c3 49 8d 47 01 42 80 7c 3f 01 00 RSP: 0018:ffffc9000e00f978 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000100000 RDX: ffffc9000ee22000 RSI: 000000000000004c RDI: 0000000000000000 RBP: ffffc9000e00fab8 R08: ffffffff9057c737 R09: 1ffffffff20af8e6 R10: dffffc0000000000 R11: fffffbfff20af8e7 R12: 1ffff92001c01f40 R13: dffffc0000000000 R14: dffffc0000000000 R15: ffffffffffffffff FS: 00007ffbe88d86c0(0000) GS:ffff88808c540000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd997a30a0 CR3: 0000000012133000 CR4: 0000000000352ef0 ---------------- Code disassembly (best guess): 0: 90 nop 1: f3 0f 1e fa endbr64 5: 41 57 push %r15 7: 41 56 push %r14 9: 41 54 push %r12 b: 53 push %rbx c: 48 c7 c0 ff ff ff ff mov $0xffffffffffffffff,%rax 13: 49 be 00 00 00 00 00 movabs $0xdffffc0000000000,%r14 1a: fc ff df 1d: 48 89 fb mov %rdi,%rbx 20: 49 89 c7 mov %rax,%r15 23: 48 89 d8 mov %rbx,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 42 0f b6 04 30 movzbl (%rax,%r14,1),%eax <-- trapping instruction 2f: 84 c0 test %al,%al 31: 75 11 jne 0x44 33: 48 ff c3 inc %rbx 36: 49 8d 47 01 lea 0x1(%r15),%rax 3a: 42 80 7c 3f 01 00 cmpb $0x0,0x1(%rdi,%r15,1)