Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752138AbdHHPBe (ORCPT ); Tue, 8 Aug 2017 11:01:34 -0400 Received: from resqmta-ch2-08v.sys.comcast.net ([69.252.207.40]:35102 "EHLO resqmta-ch2-08v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752014AbdHHPBd (ORCPT ); Tue, 8 Aug 2017 11:01:33 -0400 Date: Tue, 8 Aug 2017 10:01:31 -0500 (CDT) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Kees Cook cc: Laura Abbott , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Linux-MM , LKML , Rik van Riel Subject: Re: [RFC][PATCH] mm/slub.c: Allow poisoning to use the fast path In-Reply-To: Message-ID: References: <20170804231002.20362-1-labbott@redhat.com> <559096f0-bf1b-eff1-f0ce-33f53a4df255@redhat.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfEfv4bXtEbE7S789B3SzOJAEX+AurHp2xh+VJE8kOvjRNaoV+r0cQv0bHnVts27BYZtUBw4VqQ52C8hqJ/Peol0+K5httkyFax5gqdBjhtmrQ8UuPzFi fyN3oZM2fYz2HBtD2x3V9LDlH5eZAjZgGPZPcCl4dzyVDwyE0fvjcDBGkLP36S+gTDuD5XmBx1siq3oHQLIO1mZGYS9b8KQuj3gqShh1oKKLsaYp1Y8hanY+ DeAPWg0gGGeVEDuJuKiuJmCjv15vqIcK8Q0Tss/gfBqC9xwQrp/P3RvRLFbgcwHISFdnwlpiAwYveVOwzJqdzdMBzGk2E0ts4R56TaMpW0MEtfMbCV05W32T z7SDlSYWS3M4a7F3XWVpIxf3KULZZyzl45yvSR2oyOCgnduF3xMUybBrj4NQRo8qZpTsSVT4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1064 Lines: 24 On Mon, 7 Aug 2017, Kees Cook wrote: > > To clarify, this is desirable to kill exploitation of > exposure-after-free flaws and some classes of use-after-free flaws, > since the contents will have be wiped out after a free. (Verification > of poison is nice, but is expensive compared to the benefit against > these exploits -- and notably doesn't protect against the other > use-after-free attacks where the contents are changed after the next > allocation, which would have passed the poison verification.) Well the only variable in the freed area that is in use by the allocator is the free pointer. This ensures that complete object is poisoned and the free pointer has a separate storage area right? So the size of the slab objects increase. In addition to more hotpath processing we also have increased object sizes. I am not familiar with the terminology here. So exposure-after-free means that the contents of the object can be used after it was freed? Contents are changed after allocation? Someone gets a pointer to the object and the mods it later?