================================================================== BUG: KCSAN: data-race in strncpy / strscpy write to 0xffff8881274ef738 of 8 bytes by task 27715 on cpu 0: strscpy+0x137/0x170 lib/string.c:162 strscpy_pad+0x27/0x80 lib/string_helpers.c:835 __set_task_comm+0x46/0x140 fs/exec.c:1232 set_task_comm include/linux/sched.h:1984 [inline] __kthread_create_on_node+0x2b2/0x320 kernel/kthread.c:474 kthread_create_on_node+0x8a/0xb0 kernel/kthread.c:512 cryptomgr_schedule_probe crypto/algboss.c:158 [inline] cryptomgr_notify+0x4a4/0x590 crypto/algboss.c:226 notifier_call_chain kernel/notifier.c:87 [inline] blocking_notifier_call_chain+0x70/0xe0 kernel/notifier.c:382 crypto_probing_notify crypto/api.c:305 [inline] crypto_alg_mod_lookup+0x282/0x4e0 crypto/api.c:335 crypto_find_alg+0x62/0x70 crypto/api.c:544 crypto_type_has_alg+0x2c/0x60 crypto/algapi.c:1030 crypto_has_ahash+0x29/0x30 crypto/ahash.c:533 xfrm_probe_algs+0x56/0x2a0 net/xfrm/xfrm_algo.c:824 pfkey_register+0xd4/0x3f0 net/key/af_key.c:1701 pfkey_process net/key/af_key.c:2844 [inline] pfkey_sendmsg+0x6de/0x8f0 net/key/af_key.c:3695 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] ____sys_sendmsg+0x375/0x4c0 net/socket.c:2501 ___sys_sendmsg net/socket.c:2555 [inline] __sys_sendmsg+0x1e3/0x270 net/socket.c:2584 __do_sys_sendmsg net/socket.c:2593 [inline] __se_sys_sendmsg net/socket.c:2591 [inline] __x64_sys_sendmsg+0x46/0x50 net/socket.c:2591 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff8881274ef738 of 1 bytes by task 27723 on cpu 1: strncpy+0xf6/0x150 lib/string.c:96 set_cmdline kernel/trace/trace.c:2285 [inline] trace_save_cmdline+0x19d/0x1f0 kernel/trace/trace.c:2497 tracing_record_taskinfo_sched_switch+0x81/0x270 kernel/trace/trace.c:2637 probe_sched_switch+0x80/0x90 kernel/trace/trace_sched_switch.c:35 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x7e7/0x8e0 kernel/sched/core.c:6622 schedule+0x51/0x80 kernel/sched/core.c:6701 schedule_preempt_disabled+0x10/0x20 kernel/sched/core.c:6760 kthread+0x11c/0x1e0 kernel/kthread.c:369 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 value changed: 0x00 -> 0x72 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 27723 Comm: cryptomgr_probe Not tainted 6.3.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 ==================================================================