================================================================== BUG: KCSAN: data-race in strncpy / strscpy write to 0xffff88813c9ff738 of 8 bytes by task 8893 on cpu 0: strscpy+0x138/0x170 lib/string.c:162 strscpy_pad+0x23/0x80 lib/string_helpers.c:835 __set_task_comm+0x3b/0x110 fs/exec.c:1231 set_task_comm include/linux/sched.h:1978 [inline] __kthread_create_on_node+0x2aa/0x320 kernel/kthread.c:474 kthread_create_on_node+0x86/0xb0 kernel/kthread.c:512 cryptomgr_schedule_probe crypto/algboss.c:158 [inline] cryptomgr_notify+0x4a1/0x590 crypto/algboss.c:226 notifier_call_chain kernel/notifier.c:87 [inline] blocking_notifier_call_chain+0x73/0xf0 kernel/notifier.c:382 crypto_probing_notify crypto/api.c:305 [inline] crypto_alg_mod_lookup+0x57a/0xaf0 crypto/api.c:335 crypto_find_alg crypto/api.c:544 [inline] crypto_alloc_tfm_node+0xca/0x290 crypto/api.c:581 crypto_alloc_tfm crypto/internal.h:124 [inline] crypto_alloc_aead+0x2b/0x30 crypto/aead.c:216 esp_init_authenc net/ipv6/esp6.c:1125 [inline] esp6_init_state+0x3e9/0x960 net/ipv6/esp6.c:1195 __xfrm_init_state+0x7de/0xa30 net/xfrm/xfrm_state.c:2843 xfrm_state_construct net/xfrm/xfrm_user.c:737 [inline] xfrm_add_sa+0x172e/0x1b70 net/xfrm/xfrm_user.c:795 xfrm_user_rcv_msg+0x403/0x540 net/xfrm/xfrm_user.c:3106 netlink_rcv_skb+0x13e/0x250 net/netlink/af_netlink.c:2574 xfrm_netlink_rcv+0x43/0x60 net/xfrm/xfrm_user.c:3128 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x58a/0x660 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x666/0x760 net/netlink/af_netlink.c:1942 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] ____sys_sendmsg+0x38f/0x500 net/socket.c:2476 ___sys_sendmsg net/socket.c:2530 [inline] __sys_sendmsg+0x19a/0x230 net/socket.c:2559 __do_sys_sendmsg net/socket.c:2568 [inline] __se_sys_sendmsg net/socket.c:2566 [inline] __x64_sys_sendmsg+0x42/0x50 net/socket.c:2566 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff88813c9ff738 of 1 bytes by task 8918 on cpu 1: strncpy+0x10b/0x160 lib/string.c:96 set_cmdline kernel/trace/trace.c:2240 [inline] trace_save_cmdline kernel/trace/trace.c:2452 [inline] tracing_record_taskinfo_sched_switch+0x20f/0x610 kernel/trace/trace.c:2592 probe_sched_switch+0x7c/0x90 kernel/trace/trace_sched_switch.c:35 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x6d4/0x6f0 kernel/sched/core.c:6603 schedule+0x51/0x80 kernel/sched/core.c:6682 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6741 kthread+0x129/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: 8918 Comm: cryptomgr_probe Not tainted 6.2.0-rc5-syzkaller-00205-gc96618275234-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 ==================================================================