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]
Date:   Thu, 29 Dec 2022 12:51:52 -0800
From:   Eric Biggers <ebiggers@...nel.org>
To:     yang.yang29@....com.cn
Cc:     code@...icks.com, ira.weiny@...el.com, fmdefrancesco@...il.com,
        ecryptfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        xu.panda@....com.cn
Subject: Re: [PATCH linux-next] ecryptfs: crypto: use strscpy() to instead of
 strncpy()

On Wed, Dec 28, 2022 at 09:36:54AM +0800, yang.yang29@....com.cn wrote:
> From: Xu Panda <xu.panda@....com.cn>
> 
> The implementation of strscpy() is more robust and safer.
> That's now the recommended way to copy NUL-terminated strings.

Unlike strncpy(), strscpy() does not initialize the full destination array, so
it is unsafe in some situations, such as initializing structures that are then
copied to userspace or to disk.  Please include an actual explanation for why
this patch is correct.

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ