fs-exec-replace-strncpy-with-strscpy_pad-in-__get_task_comm.patch removed from -mm tree
The patch titled
Subject: fs/exec: replace strncpy with strscpy_pad in __get_task_comm
has been removed from the -mm tree. Its filename was
fs-exec-replace-strncpy-with-strscpy_pad-in-__get_task_comm.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Yafang Shao <[email protected]>
Subject: fs/exec: replace strncpy with strscpy_pad in __get_task_comm
If the dest buffer size is smaller than sizeof(tsk->comm), the buffer will be without null ternimator, that may cause problem. Using strscpy_pad() instead of strncpy() in __get_task_comm() can make the string always nul ternimated and zero padded.
---
fs/exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/exec.c renamed from fs/exec.c~fs-exec-replace-strncpy-with-strscpy_pad-in-__get_task_comm +2 -1
@@ -1207,7 +1207,8 @@ static int unshare_sighand(struct task_schar *__get_task_comm (char *buf,size_t buf_size,struct task_struct *tsk) {task_lock (tsk); -strncpy (buf, tsk->comm, buf_size); +/* Always NUL terminated and zero-padded */ +strscpy_pad (buf, tsk->comm, buf_size);task_unlock (tsk);return buf; }
_
Patches currently in -mm which might be from [email protected] are