[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <171400293647.3284001.3215911382372065308.b4-ty@chromium.org>
Date: Wed, 24 Apr 2024 16:55:38 -0700
From: Kees Cook <keescook@...omium.org>
To: Justin Stitt <justinstitt@...gle.com>
Cc: Kees Cook <keescook@...omium.org>,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2] hfsplus: refactor copy_name to not use strncpy
On Mon, 01 Apr 2024 18:10:48 +0000, Justin Stitt wrote:
> strncpy() is deprecated with NUL-terminated destination strings [1].
>
> The copy_name() method does a lot of manual buffer manipulation to
> eventually arrive with its desired string. If we don't know the
> namespace this attr has or belongs to we want to prepend "osx." to our
> final string. Following this, we're copying xattr_name and doing a
> bizarre manual NUL-byte assignment with a memset where n=1.
>
> [...]
Applied to for-next/hardening, thanks!
[1/1] hfsplus: refactor copy_name to not use strncpy
https://git.kernel.org/kees/c/628a89b6ef79
Take care,
--
Kees Cook
Powered by blists - more mailing lists