[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202307121100.A6E650B@keescook>
Date: Wed, 12 Jul 2023 11:04:05 -0700
From: Kees Cook <keescook@...omium.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Azeem Shaikh <azeemshaikh38@...il.com>,
linux-hardening@...r.kernel.org, linux-hwmon@...r.kernel.org,
linux-kernel@...r.kernel.org, Jean Delvare <jdelvare@...e.com>
Subject: Re: [PATCH] hwmon: Remove strlcpy occurences
On Wed, Jul 12, 2023 at 08:16:39AM -0700, Guenter Roeck wrote:
> On 7/12/23 07:44, Azeem Shaikh wrote:
> > [...]
> > + len = strlen(result);
> > return simple_read_from_buffer(buf, count, ppos, tbuf, len);
>
> This still copies tbuf, meaning all those constant strings won't actually
> be reported.
Ah dang, thanks for catching that. Yeah, "tbuf" should be replaced by
"result" in the simple_read_from_buffer().
--
Kees Cook
Powered by blists - more mailing lists