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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 22 Oct 2020 11:40:36 +0200
From:   Francis Laniel <laniel_francis@...vacyrequired.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     linux-hardening@...r.kernel.org, netdev@...r.kernel.org,
        davem@...emloft.net, kuba@...nel.org
Subject: Re: [RFC][PATCH v3 2/3] Modify return value of nla_strlcpy to match that of strscpy.

Le jeudi 22 octobre 2020, 01:48:37 CEST Kees Cook a écrit :
> On Tue, Oct 20, 2020 at 06:47:06PM +0200, laniel_francis@...vacyrequired.com 
wrote:
> > From: Francis Laniel <laniel_francis@...vacyrequired.com>
> > 
> > nla_strlcpy now returns -E2BIG if src was truncated when written to dst.
> > It also returns this error value if dstsize is 0 or higher than INT_MAX.
> > 
> > For example, if src is "foo\0" and dst is 3 bytes long, the result will
> > be:
> > 1. "foG" after memcpy (G means garbage).
> > 2. "fo\0" after memset.
> > 3. -E2BIG is returned because src was not completely written into dst.
> > 
> > The callers of nla_strlcpy were modified to take into account this
> > modification.
> > 
> > Signed-off-by: Francis Laniel <laniel_francis@...vacyrequired.com>
> 
> This looks correct to me. Thanks for the respin!

Perfect! You are welcome!

> 
> Reviewed-by: Kees Cook <keescook@...omium.org>




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ