lkml.org 
[lkml]   [2023]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] um,ethertap: refactor deprecated strncpy
Date
On Mon, 11 Sep 2023 17:52:44 +0000, Justin Stitt wrote:
> `strncpy` is deprecated for use on NUL-terminated destination strings [1].
>
> `gate_buf` should always be NUL-terminated and does not require
> NUL-padding. It is used as a string arg inside an argv array given to
> `run_helper()`. Due to this, let's use `strscpy` as it guarantees
> NUL-terminated on the destination buffer preventing potential buffer
> overreads [2].
>
> [...]

Applied to for-next/hardening, thanks!

[1/1] um,ethertap: refactor deprecated strncpy
https://git.kernel.org/kees/c/d4e178fe19c9

Take care,

--
Kees Cook

\
 
 \ /
  Last update: 2023-09-29 20:34    [W:0.059 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site