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: <CANn89iKSoepe69FvKaSyP4n9ZQpeP54FWkwby9Ju1A4GFHUQ6w@mail.gmail.com>
Date:   Mon, 1 Oct 2018 09:25:35 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     Herbert Xu <herbert@...dor.apana.org.au>
Cc:     David Miller <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Thomas Graf <tgraf@...g.ch>
Subject: Re: [PATCH net] rhashtable: prevent work queue schedule while dismantling

On Mon, Oct 1, 2018 at 6:40 AM Herbert Xu <herbert@...dor.apana.org.au> wrote:
>
> On Mon, Oct 01, 2018 at 06:16:27AM -0700, Eric Dumazet wrote:
> > syszbot found an interesting use-after-free [1] happening
> > while IPv4 fragment rhashtable was destroyed at netns dismantle.
> >
> > While no insertions can possibly happen at the time a dismantling
> > netns is destroying this rhashtable, timers can still fire and
> > attempt to remove elements from this rhashtable.
>
> Hmm, I think that's your real problem.  rhashtable_free_and_destroy
> doesn't take any locks with respect to the normal insertion/removal
> path so it definitely isn't safe to call it while you're still
> invoking the normal rhashtable remove function.
>

Ah... for some reason I thought it was ok to delete elems while
rhashtable_free_and_destroy() was running.

I would love not having to use a rhashtable_walk...() to first expunge
the hash table
before rhashtable_destroy()

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ