]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
exec: use strnlen() in __set_task_comm
authorThorsten Blum <thorsten.blum@linux.dev>
Wed, 1 Apr 2026 15:20:40 +0000 (17:20 +0200)
committerKees Cook <kees@kernel.org>
Wed, 1 Apr 2026 19:26:07 +0000 (12:26 -0700)
commit10cd6758e054e4002ccb409fef7dd2c6b7bbd549
tree8e4c7907372a2a8980cbf77731dca811d0defe3b
parent4ced4cf5c9d172d91f181df3accdf949d3761aab
exec: use strnlen() in __set_task_comm

Use strnlen() to limit source string scanning to 'TASK_COMM_LEN - 1'
bytes.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260401152039.724811-3-thorsten.blum@linux.dev
Signed-off-by: Kees Cook <kees@kernel.org>
fs/exec.c