From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Lameter Subject: Re: [PATCH 1/1] mm/slub.c: add a naive detection of double free or corruption Date: Wed, 19 Jul 2017 09:02:27 -0500 (CDT) Message-ID: References: <1500309907-9357-1-git-send-email-alex.popov@linux.com> <20170717175459.GC14983@bombadil.infradead.org> <1edb137c-356f-81d6-4592-f5dfc68e8ea9@linux.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Kees Cook Cc: Alexander Popov , Matthew Wilcox , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Linux-MM , LKML , "kernel-hardening@lists.openwall.com" List-Id: linux-mm.kvack.org On Tue, 18 Jul 2017, Kees Cook wrote: > I think there are two issues: first, this should likely be under > CONFIG_FREELIST_HARDENED since Christoph hasn't wanted to make these > changes enabled by default (if I'm understanding his earlier review > comments to me). The second issue is what to DO when a double-free is > discovered. Is there any way to make it safe/survivable? If not, I The simple thing is to not free the object when you discover this. That is what the existing debugging code does. But you do not have an easy way to fail at the point in the code that is patched here.