lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 27 Nov 2023 16:38:27 -0800
From: Kees Cook <keescook@...omium.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Tejun Heo <tj@...nel.org>, Azeem Shaikh <azeemshaikh38@...il.com>,
	Zefan Li <lizefan.x@...edance.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Waiman Long <longman@...hat.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
	linux-trace-kernel@...r.kernel.org, bpf@...r.kernel.org,
	linux-hardening@...r.kernel.org
Subject: Re: [PATCH 0/3] kernfs: Convert from strlcpy() to strscpy()

On Mon, Nov 27, 2023 at 01:43:57PM +0000, Greg Kroah-Hartman wrote:
> On Thu, Nov 16, 2023 at 11:21:22AM -0800, Kees Cook wrote:
> > Hi,
> > 
> > One of the last users of strlcpy() is kernfs, which has some complex
> > calling hierarchies that needed to be carefully examined. This series
> > refactors the strlcpy() calls into strscpy() calls, and bubbles up all
> > changes in return value checking for callers.
> 
> Why not work instead to convert kernfs (and by proxy cgroups) to use the
> "safe" string functions based on seq_file?  This should be a simpler
> patch series to review, and implement on a per-function basis, and then
> we would not have any string functions in kernfs anymore.

One thing at a time. :) This lets us finish the strlcpy() removal. But
yes, replacing all of kernfs/sysfs to pass a seq_buf instead of a char *
is on the list. :) I think I see a way to transition to it, too.

-- 
Kees Cook

Powered by blists - more mailing lists