[<ffffffff8000a908>] syscall_handler+0x76/0xba arch/riscv/include/asm/syscall.h:90 [<ffffffff836b6b0c>] do_trap_ecall_u+0x9c/0x9e arch/riscv/kernel/traps.c:320 [<ffffffff80005c30>] ret_from_exception+0x0/0x64 arch/riscv/kernel/entry.S:102 ================================================================== BUG: KASAN: null-ptr-deref in strchr+0x18/0x58 lib/string.c:329 Read of size 1 at addr 0000000000000000 by task syz-executor.0/14749 CPU: 1 PID: 14749 Comm: syz-executor.0 Not tainted 6.6.0-rc1-syzkaller-00011-g3fec323339a4 #0 Hardware name: riscv-virtio,qemu (DT) Call Trace: [<ffffffff8000b904>] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:121 [<ffffffff836750b8>] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:127 [<ffffffff836b56c0>] __dump_stack lib/dump_stack.c:88 [inline] [<ffffffff836b56c0>] dump_stack_lvl+0xe8/0x154 lib/dump_stack.c:106 [<ffffffff8367dad6>] print_report+0x4da/0x4f4 mm/kasan/report.c:478 [<ffffffff805791de>] kasan_report+0xf0/0x1ba mm/kasan/report.c:588 [<ffffffff8057a146>] check_region_inline mm/kasan/generic.c:181 [inline] [<ffffffff8057a146>] __asan_load1+0x68/0x80 mm/kasan/generic.c:257 [<ffffffff8365b58a>] strchr+0x18/0x58 lib/string.c:329 [<ffffffff80c25ca2>] kvasprintf_const+0x2c/0xc6 lib/kasprintf.c:45 [<ffffffff8362c296>] kobject_set_name_vargs+0x50/0xf2 lib/kobject.c:272 [<ffffffff8362c5ea>] kobject_add_varg lib/kobject.c:366 [inline] [<ffffffff8362c5ea>] kobject_add+0xda/0x1a0 lib/kobject.c:424 [<ffffffff8170ba32>] device_add+0x216/0x10fa drivers/base/core.c:3560 [<ffffffff83555936>] nfc_register_device+0x5a/0x2b4 net/nfc/core.c:1118 [<ffffffff8357032e>] nci_register_device+0x534/0x612 net/nfc/nci/core.c:1257 [<ffffffff817d5fd2>] virtual_ncidev_open+0xf8/0x172 drivers/nfc/virtual_ncidev.c:148 [<ffffffff8109f6e8>] misc_open+0x2b2/0x2e8 drivers/char/misc.c:165 [<ffffffff805ec060>] chrdev_open+0x1cc/0x474 fs/char_dev.c:414 [<ffffffff805d58c6>] do_dentry_open+0x4d0/0xa84 fs/open.c:929 [<ffffffff805d95fc>] vfs_open+0x52/0x5e fs/open.c:1063 [<ffffffff8060a34c>] do_open fs/namei.c:3639 [inline] [<ffffffff8060a34c>] path_openat+0x1014/0x1714 fs/namei.c:3796 [<ffffffff8060b9cc>] do_filp_open+0x126/0x252 fs/namei.c:3823 [<ffffffff805d9d46>] do_sys_openat2+0x170/0x1bc fs/open.c:1422 [<ffffffff805da666>] do_sys_open fs/open.c:1437 [inline] [<ffffffff805da666>] __do_sys_openat fs/open.c:1453 [inline] [<ffffffff805da666>] __se_sys_openat fs/open.c:1448 [inline] [<ffffffff805da666>] __riscv_sys_openat+0x136/0x1a4 fs/open.c:1448 [<ffffffff8000a908>] syscall_handler+0x76/0xba arch/riscv/include/asm/syscall.h:90 [<ffffffff836b6b0c>] do_trap_ecall_u+0x9c/0x9e arch/riscv/kernel/traps.c:320 [<ffffffff80005c30>] ret_from_exception+0x0/0x64 arch/riscv/kernel/entry.S:102 ==================================================================