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: <20170718145403.GC19030@fieldses.org>
Date:   Tue, 18 Jul 2017 10:54:03 -0400
From:   "J . Bruce Fields" <bfields@...ldses.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     Daniel Micay <danielmicay@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Dave Jones <davej@...emonkey.org.uk>,
        Anna Schumaker <schumaker.anna@...il.com>,
        Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Alexander Potapenko <glider@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        kasan-dev <kasan-dev@...glegroups.com>
Subject: Re: [PATCH] replace incorrect strscpy use in FORTIFY_SOURCE

On Fri, Jul 14, 2017 at 04:51:31PM -0700, Kees Cook wrote:
> On Fri, Jul 14, 2017 at 2:28 PM, Daniel Micay <danielmicay@...il.com> wrote:
> > Using strscpy was wrong because FORTIFY_SOURCE is passing the maximum
> > possible size of the outermost object, but strscpy defines the count
> > parameter as the exact buffer size, so this could copy past the end of
> > the source. This would still be wrong with the planned usage of
> > __builtin_object_size(p, 1) for intra-object overflow checks since it's
> > the maximum possible size of the specified object with no guarantee of
> > it being that large.
> >
> > Reuse of the fortified functions like this currently makes the runtime
> > error reporting less precise but that can be improved later on.
> >
> > Signed-off-by: Daniel Micay <danielmicay@...il.com>
> 
> Thanks for fixing this! Linus, do you want to take this directly or
> have it go via -mm where fortify landed originally?
> 
> Acked-by: Kees Cook <keescook@...omium.org>
> 
> As far as testing goes, was the NFS tree not in -next, or was a test
> not running against -next? I'm curious why it took until the NFS tree
> landed in Linus's tree for this to get noticed. Fortify was in -next
> for a while...

There was a last-minute rebase of that tree.  I don't see anything
relevant there.  The code in question has been the same for ages.  But I
most be overlooking something....  I guess it could be interesting to
bisect to figure out when the warning started.

--b.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ