Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 10 Jan 2018 12:14:07 -0800
From: Kees Cook <>
To: Christopher Lameter <>
Cc: LKML <>, David Windsor <>, 
	Pekka Enberg <>, David Rientjes <>, 
	Joonsoo Kim <>, Andrew Morton <>, 
	Laura Abbott <>, Ingo Molnar <>, 
	Mark Rutland <>, Linux-MM <>,, 
	Linus Torvalds <>, Alexander Viro <>, 
	Andy Lutomirski <>, Christoph Hellwig <>, 
	"David S. Miller" <>, "Martin K. Petersen" <>, 
	Paolo Bonzini <>, Christian Borntraeger <>, 
	Christoffer Dall <>, Dave Kleikamp <>, 
	Jan Kara <>, Luis de Bethencourt <>, Marc Zyngier <>, 
	Rik van Riel <>, Matthew Garrett <>, 
	"" <>, linux-arch <>, 
	Network Development <>,
Subject: Re: [PATCH 05/36] usercopy: WARN() on slab cache usercopy region violations

On Wed, Jan 10, 2018 at 10:31 AM, Christopher Lameter <> wrote:
> On Tue, 9 Jan 2018, Kees Cook wrote:
>> @@ -3823,11 +3825,9 @@ int __check_heap_object(const void *ptr, unsigned long n, struct page *page,
> Could we do the check in mm_slab_common.c for all allocators and just have
> a small function in each allocators that give you the metadata needed for
> the object?

That could be done, but there would still need to be some
implementation-specific checks in the per-implementation side (e.g.
red-zone, etc). I'll work up a patch and see if it's less ugly than
what I've currently got. :)

>> + * carefully audit the whitelist range).
>> + */
>>  int report_usercopy(const char *name, const char *detail, bool to_user,
>>                   unsigned long offset, unsigned long len)
>>  {
> Should this not be added earlier?

This seemed like the best place to add this since it's where the WARN
is being added, so it's a bit more help for anyone looking at the


Kees Cook
Pixel Security

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.