Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 3 Nov 2016 18:05:37 +0000
From: Mark Rutland <>
To: Vaishali Thakkar <>
Cc: Kees Cook <>,
	"" <>,
	Al Viro <>,
	David Windsor <>
Subject: Re: [RFC PATCH] lib: Harden

On Thu, Nov 03, 2016 at 10:26:41AM +0530, Vaishali Thakkar wrote:
> On Thursday 03 November 2016 09:53 AM, Mark Rutland wrote:
> > On Thu, Nov 03, 2016 at 07:44:35AM +0530, Vaishali Thakkar wrote:
> >> On Thursday 03 November 2016 03:29 AM, Kees Cook wrote:
> >>> On Wed, Nov 2, 2016 at 2:44 PM, Mark Rutland <> wrote:
> >>>> I know that both arm64 and x86 have a check_object_size() call in their
> >>>> __copy_from_user() implementations.
> > 
> >>>> Is that missing on some architectures?

> > Looking again, a grep shows many (even those with MMUs) don't do anything at
> > all in v4.9-rc2:
> > 
> > [mark@...oulade:~/src/linux]% for ARCH in arch/*; do
> > printf "%d %s\n" $(git grep check_object_size -- "${ARCH}" | wc -l) ${ARCH};
> > done | sort -n

> Hmm, should we go for sending patches for them? [atleast for the ones with MMUs
> and then may be maintainers/developers can check the change]

If Al's uaccess unification work is arriving shortly, sending patches for those
in parallel is just going to make matters more painful.

So it really depends on when that's likely to appear.

> Also, I think same goes for the the kasan_check. We have only arm64 and x86  
> with these checks.

Yes. I'd hoped to collect all of those behind a common helper, something like:

static inline void check_uaccess_read(void *kaddr, const void __user *uaddr, unsigned long n)
	kasan_check_write(kaddr, n);
	check_object_size(kaddr, n, false);
	any_uaddr_sanity_check(uaddr, n);


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.