[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGXu5jKVisZvM7LTddoG-GnPXYO-f_-F2_4sytX2gpO7K-+Rfg@mail.gmail.com>
Date: Wed, 11 Oct 2017 00:21:44 -0700
From: Kees Cook <keescook@...omium.org>
To: Tyler Hicks <tyhicks@...onical.com>
Cc: Jakub Kicinski <kubakici@...pl>, Simon Brewer <sbrunau@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: BUG: KASAN: global-out-of-bounds in strscpy+0x807/0x970
On Tue, Oct 10, 2017 at 9:37 PM, Tyler Hicks <tyhicks@...onical.com> wrote:
> On 10/10/2017 10:32 PM, Simon Brewer wrote:
>> Hint start looking at this thread. https://lkml.org/lkml/2017/7/18/874
>>
>> Summary: strscpy and KASAN are currently incompatible. strscpy does a
>> 64 bit speculative fetch on a char pointer (for efficiency reasons).
>> KASAN spots this and flags an error.
>
> Thanks, Simon. I had already reviewed the loop in
> seccomp_names_from_actions_logged() and couldn't spot an issue so my
> next step was to take a look at strscpy() itself. Your reply was well
> timed. :)
>
> @Kees, this is a false positive. I picked strscpy() because of its sane
> return codes for easy error handling but its word-at-a-time complexity
> is overkill for this sysctl. Are you alright with this KASAN false
> positive or would you like me to change over to strlcpy()?
I tend to prefer strscpy. I don't think we need a change here. Thanks!
-Kees
--
Kees Cook
Pixel Security
Powered by blists - more mailing lists