[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <169601235586.3007879.13354261591100704778.b4-ty@chromium.org>
Date: Fri, 29 Sep 2023 11:32:37 -0700
From: Kees Cook <keescook@...omium.org>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Jason Wang <jasowang@...hat.com>,
Richard Weinberger <richard@....at>,
Anton Ivanov <anton.ivanov@...bridgegreys.com>,
Johannes Berg <johannes@...solutions.net>,
Justin Stitt <justinstitt@...gle.com>
Cc: Kees Cook <keescook@...omium.org>,
linux-um@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH] um,ethertap: refactor deprecated strncpy
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
Powered by blists - more mailing lists