Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <04e89784-5ca8-0ecc-2735-4196ace74b0b@linux.com>
Date: Thu, 27 Feb 2020 14:28:30 +0300
From: Alexander Popov <alex.popov@...ux.com>
To: zerons <zeronsaxm@...il.com>
Cc: Andrey Konovalov <andreyknvl@...gle.com>,
 kernel-hardening@...ts.openwall.com, Shawn <citypw@...denedlinux.org>,
 spender@...ecurity.net, Jann Horn <jannh@...gle.com>,
 Kees Cook <keescook@...omium.org>
Subject: Re: Maybe inappropriate use BUG_ON() in CONFIG_SLAB_FREELIST_HARDENED

On 19.02.2020 16:43, zerons wrote:
> This patch does work for cve-2017-2636 case, it is barely impossible to win the
> race. My concern is based on an assumption: we do have a double kfree() bug and
> we can win the race.

Yes, I agree that the double-free check in CONFIG_SLAB_FREELIST_HARDENED can be
bypassed in some cases by winning the race and inserting kmalloc() between kfree().

But I *don't* agree that this double-free check can help the attacker.

Without this check in CONFIG_SLAB_FREELIST_HARDENED, double-free exploitation is
always easier, since the attacker has no need to race at all. In the write-up
about CVE-2017-2636 exploit [1] I showed how to do heap spray *after*
double-free (kfree-kfree-kmalloc-kmalloc).

Best regards,
Alexander

[1]: https://a13xp0p0v.github.io/2017/03/24/CVE-2017-2636.html

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.