Re: [pcpu] BUG: KASAN: use-after-scope in pcpu_setup_first_chunk+0x1e3b/0x29e2

2017-11-30 Thread Ard Biesheuvel
On 30 November 2017 at 19:56, Kees Cook wrote: > On Thu, Nov 30, 2017 at 11:22 AM, Dennis Zhou wrote: >> Hi Dmitry and Kees, >> >> On Thu, Nov 30, 2017 at 10:10:41AM -0800, Kees Cook wrote: >>> > Are we sure that structleak plugin is not at fault? If yes, then we >>> > need to report this to http

Re: [pcpu] BUG: KASAN: use-after-scope in pcpu_setup_first_chunk+0x1e3b/0x29e2

2017-11-30 Thread Kees Cook
On Thu, Nov 30, 2017 at 11:22 AM, Dennis Zhou wrote: > Hi Dmitry and Kees, > > On Thu, Nov 30, 2017 at 10:10:41AM -0800, Kees Cook wrote: >> > Are we sure that structleak plugin is not at fault? If yes, then we >> > need to report this to https://gcc.gnu.org/bugzilla/ with instructions >> > on how

Re: [pcpu] BUG: KASAN: use-after-scope in pcpu_setup_first_chunk+0x1e3b/0x29e2

2017-11-30 Thread Dennis Zhou
Hi Dmitry and Kees, On Thu, Nov 30, 2017 at 10:10:41AM -0800, Kees Cook wrote: > > Are we sure that structleak plugin is not at fault? If yes, then we > > need to report this to https://gcc.gnu.org/bugzilla/ with instructions > > on how to build/use the plugin. I believe this is an issue with the

Re: [pcpu] BUG: KASAN: use-after-scope in pcpu_setup_first_chunk+0x1e3b/0x29e2

2017-11-30 Thread Kees Cook
On Thu, Nov 30, 2017 at 1:59 AM, Dmitry Vyukov wrote: > On Wed, Nov 29, 2017 at 6:54 PM, Dennis Zhou wrote: >> Hi everyone, >> >> I spent a bit of time learning more about this problem as Fengguang was >> able to determine the root commit f7dd2507893cc3. I reproduced the bug >> in userspace to ma

Re: [pcpu] BUG: KASAN: use-after-scope in pcpu_setup_first_chunk+0x1e3b/0x29e2

2017-11-30 Thread Dmitry Vyukov
On Wed, Nov 29, 2017 at 6:54 PM, Dennis Zhou wrote: > Hi everyone, > > I spent a bit of time learning more about this problem as Fengguang was > able to determine the root commit f7dd2507893cc3. I reproduced the bug > in userspace to make life a bit easier and below the assignment occurs > before

Re: [pcpu] BUG: KASAN: use-after-scope in pcpu_setup_first_chunk+0x1e3b/0x29e2

2017-11-29 Thread Dennis Zhou
Hi everyone, I spent a bit of time learning more about this problem as Fengguang was able to determine the root commit f7dd2507893cc3. I reproduced the bug in userspace to make life a bit easier and below the assignment occurs before the unpoison. This is fine if we're sequentially proceeding, but

Re: [pcpu] BUG: KASAN: use-after-scope in pcpu_setup_first_chunk+0x1e3b/0x29e2

2017-11-28 Thread Fengguang Wu
Hi Dennis, On Mon, Nov 27, 2017 at 03:03:01PM -0600, Dennis Zhou wrote: Hi Fangguang, On Sun, Nov 26, 2017 at 02:31:17PM +0800, Fengguang Wu wrote: Hello, FYI this happens in mainline kernel 4.14.0-13151-g5a78775. This looks like a new regression after 4.14. I have reproduced this with the

Re: [pcpu] BUG: KASAN: use-after-scope in pcpu_setup_first_chunk+0x1e3b/0x29e2

2017-11-27 Thread Dennis Zhou
Hi Fangguang, On Sun, Nov 26, 2017 at 02:31:17PM +0800, Fengguang Wu wrote: > Hello, > > FYI this happens in mainline kernel 4.14.0-13151-g5a78775. > This looks like a new regression after 4.14. I have reproduced this with the commit and scripts attached. The offending line is the INIT_LIST_HEAD