From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 28 Jan 2019 20:08:23 +0000 From: Christopher Lameter Subject: Re: [PATCH] mm: Prevent mapping slab pages to userspace In-Reply-To: Message-ID: <010001689613c1b5-6539225d-b74e-4248-8d8f-5b801c1a333b-000000@email.amazonses.com> References: <20190125173827.2658-1-willy@infradead.org> <20190128102055.5b0790549542891c4dca47a3@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII To: Kees Cook Cc: Andrew Morton , Matthew Wilcox , Linux-MM , LKML , Rik van Riel , Pekka Enberg , David Rientjes , Joonsoo Kim , Kernel Hardening , Michael Ellerman List-ID: On Tue, 29 Jan 2019, Kees Cook wrote: > It seems like a fatal condition to me? There's nothing to check that > such a page wouldn't get freed by the slab while still mapped to > userspace, right? Lets just fail the code. Currently this may work with SLUB. But SLAB and SLOB overlay fields with mapcount. So you would have a corrupted page struct if you mapped a slab page to user space.