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: <CAAeHK+wB4L9nj+iPf8iHUbuWBCE_FQN4aea4zswEd4bbr49FPQ@mail.gmail.com>
Date:   Wed, 3 Apr 2019 18:39:30 +0200
From:   Andrey Konovalov <andreyknvl@...gle.com>
To:     Qian Cai <cai@....pw>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Christoph Lameter <cl@...ux.com>,
        Pekka Enberg <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Alexander Potapenko <glider@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        kasan-dev <kasan-dev@...glegroups.com>,
        Linux Memory Management List <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] slab: store tagged freelist for off-slab slabmgmt

On Wed, Apr 3, 2019 at 3:07 PM Qian Cai <cai@....pw> wrote:
>
> On Wed, 2019-04-03 at 13:23 +0200, Andrey Konovalov wrote:
> > On Wed, Apr 3, 2019 at 4:29 AM Qian Cai <cai@....pw> wrote:
> > >
> > > The commit 51dedad06b5f ("kasan, slab: make freelist stored without
> > > tags") calls kasan_reset_tag() for off-slab slab management object
> > > leading to freelist being stored non-tagged. However, cache_grow_begin()
> > > -> alloc_slabmgmt() -> kmem_cache_alloc_node() which assigns a tag for
> > > the address and stores in the shadow address. As the result, it causes
> > > endless errors below during boot due to drain_freelist() ->
> > > slab_destroy() -> kasan_slab_free() which compares already untagged
> > > freelist against the stored tag in the shadow address. Since off-slab
> > > slab management object freelist is such a special case, so just store it
> > > tagged. Non-off-slab management object freelist is still stored untagged
> > > which has not been assigned a tag and should not cause any other
> > > troubles with this inconsistency.
> >
> > Hi Qian,
> >
> > Could you share the config (or other steps) you used to reproduce this?
>
> https://git.sr.ht/~cai/linux-debug/blob/master/config
>
> Additional command-line option to boot:
>
> page_poison=on crashkernel=768M earlycon page_owner=on numa_balancing=enable
> systemd.unified_cgroup_hierarchy=1 debug_guardpage_minorder=1

Reproduced, thanks!

As far as my understanding of how SLAB works goes, this change looks good to me.

Reviewed-by: Andrey Konovalov <andreyknvl@...gle.com>

Thanks, Qian!

>
> --
> You received this message because you are subscribed to the Google Groups "kasan-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@...glegroups.com.
> To post to this group, send email to kasan-dev@...glegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/1554296870.26196.32.camel%40lca.pw.
> For more options, visit https://groups.google.com/d/optout.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ