Skip to content
Commit 33c9be90 authored by James Harris's avatar James Harris Committed by Anas Nashif
Browse files

kernel: fix TOCTTOU issue in k_thread_name_set



Previously, a racing write to the provided string could result
in up to CONFIG_THREAD_MAX_NAME_LEN-2 bytes after the end
of user-accessible memory being leaked into the thread name.

For now, make a temporary copy. In an ideal world this could
copy directly from userspace into the thread name, but that
violates the current vrfy / impl split.

Signed-off-by: default avatarJames Harris <james.harris@intel.com>
parent 6f82ebe2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment