[lkml]   [2017]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] lib/string: avoid reading beyond src buffer in strscpy
On Tue, Dec 12, 2017 at 8:06 AM, Andrey Ryabinin
<> wrote:
> See for yourself, strscpy() is the only sting function doing this.

No, strnlen_user() definitely does too.

It's just that KASAN doesn't track user pointers.

And the important strlen() in the kernel is the pathname hashing code,
which *definitely* accesses outside the source, but since it can
actually traverse to another page we have that one annotated too (with

So no, strscpy() isn't the only one doing it, it is just the only one
that KASAN catches.


 \ /
  Last update: 2017-12-12 23:43    [W:0.083 / U:9.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site