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:   Wed, 18 Nov 2020 11:41:13 +0100
From:   Francis Laniel <laniel_francis@...vacyrequired.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     linux-hardening@...r.kernel.org, dja@...ens.net
Subject: Re: [RFC PATCH v4 0/5] Fortify strscpy()

Le mardi 17 novembre 2020, 23:06:07 CET Kees Cook a écrit :
> On Mon, Nov 16, 2020 at 03:50:07PM +0100, laniel_francis@...vacyrequired.com 
wrote:
> > This patch set answers to this issue:
> > https://github.com/KSPP/linux/issues/46
> > 
> > I based my modifications on top of two patches from Daniel Axtens which
> > modify calls to __builtin_object_size to ensure the true size of char *
> > are returned and not the surrounding structure size.
> > 
> > To sum up, in my first patch I implemented a fortified version of strscpy.
> > This new version ensures the following before calling vanilla strscpy:
> > 1. There is no read overflow because we either size is smaller than src
> > length or we shrink size to src length by calling fortified strnlen.
> > 2. There is no write overflow because we either failed during compilation
> > or at runtime by checking that size is smaller than dest size.
> > The second patch brings a new file in LKDTM driver to test this new
> > version. The test ensures the fortified version still returns the same
> > value as the vanilla one while panic'ing when there is a write overflow.
> > The third just corrects some typos in LKDTM related file.
> > 
> > If you see any problem or way to improve the code, feel free to share it.
> 
> Thanks! This looks really good. You can drop the "RFC" parts, and for
> v5, please use
> 
> 	To: Andrew Morton <akpm@...ux-foundation.org>
> 
> and add to Cc:
> 
> 	linux-mm@...ck.org
> 	linux-kernel@...r.kernel.org
> 
> I think going via -mm is the most sensible, since that's where the other
> fortify pieces landed.

You are welcome and thank you for the reviews!
I rebase it on Linus Torvalds' tree and I send the V5.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ