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: <CAPhsuW4TOM+u+W2YwDkQjjZbDubPDR_69F0VMxSOzb6eRMPbaw@mail.gmail.com>
Date:   Wed, 9 Oct 2019 09:37:24 -0700
From:   Song Liu <liu.song.a23@...il.com>
To:     Alexey Kardashevskiy <aik@...abs.ru>
Cc:     Catalin Marinas <catalin.marinas@....com>,
        Linux-MM <linux-mm@...ck.org>,
        open list <linux-kernel@...r.kernel.org>,
        Marc Dionne <marc.c.dionne@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] kmemleak: Do not corrupt the object_list during clean-up

On Fri, Oct 4, 2019 at 8:11 PM Alexey Kardashevskiy <aik@...abs.ru> wrote:
>
>
>
> On 04/10/2019 23:46, Catalin Marinas wrote:
> > In case of an error (e.g. memory pool too small), kmemleak disables
> > itself and cleans up the already allocated metadata objects. However, if
> > this happens early before the RCU callback mechanism is available,
> > put_object() skips call_rcu() and frees the object directly. This is not
> > safe with the RCU list traversal in __kmemleak_do_cleanup().
> >
> > Change the list traversal in __kmemleak_do_cleanup() to
> > list_for_each_entry_safe() and remove the rcu_read_{lock,unlock} since
> > the kmemleak is already disabled at this point. In addition, avoid an
> > unnecessary metadata object rb-tree look-up since it already has the
> > struct kmemleak_object pointer.
> >
> > Fixes: c5665868183f ("mm: kmemleak: use the memory pool for early allocations")
> > Reported-by: Alexey Kardashevskiy <aik@...abs.ru>
> > Reported-by: Marc Dionne <marc.c.dionne@...il.com>
> > Cc: Andrew Morton <akpm@...ux-foundation.org>
> > Signed-off-by: Catalin Marinas <catalin.marinas@....com>
>
>
> Tested-by: Alexey Kardashevskiy <aik@...abs.ru>

Tested-by: Song Liu <songliubraving@...com>

This fixes my vm, which could not boot with 5.4-rc3.

Thanks,
Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ