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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220711121014.6f9e75cb@gandalf.local.home>
Date:   Mon, 11 Jul 2022 12:10:14 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     "XueBing Chen" <chenxuebing@...i.cn>
Cc:     mingo@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tracing: use strscpy to replace strlcpy

On Mon, 11 Jul 2022 10:41:25 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> On Mon, 11 Jul 2022 22:26:12 +0800 (GMT+08:00)
> "XueBing Chen" <chenxuebing@...i.cn> wrote:
> 
> > The strlcpy should not be used because it doesn't limit the source
> > length. Preferred is strscpy.  
> 
> That's not enough justification to make the switch.
> 
> These calls are done at boot up. If there's a bug in the source, I rather
> have it crash.

And unless there is good justification and understanding of how the code
works, blindly switching strlcpy() with strscpy() can have undesirable
consequences:

  https://lore.kernel.org/all/20220701094403.3044-1-adrian.hunter@intel.com/T/#u

Please stop changing all strlcpy() to strscpy() unless there's good
justification to do so. Just saying "strscpy() is preferred", is not
justification to make the change.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ