lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 5 Apr 2017 14:17:54 +0100
From:   Mark Rutland <mark.rutland@....com>
To:     Laura Abbott <labbott@...hat.com>
Cc:     Kees Cook <keescook@...omium.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] mm/usercopy: Drop extra is_vmalloc_or_module check

On Tue, Apr 04, 2017 at 02:09:00PM -0700, Laura Abbott wrote:
> virt_addr_valid was previously insufficient to validate if virt_to_page
> could be called on an address on arm64. This has since been fixed up
> so there is no need for the extra check. Drop it.
> 
> Signed-off-by: Laura Abbott <labbott@...hat.com>
> ---
> I've given this some testing on my machine and haven't seen any problems
> (e.g. random crashes without the check) and the fix has been in for long
> enough now. I'm in no rush to have this merged so I'm okay if this sits in
> a tree somewhere to get more testing.

This looks good to me, given your fix for virt_add_valid() in mainline.
FWIW:

Acked-by: Mark Rutland <mark.rutland@....com>

Mark.

> ---
>  mm/usercopy.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/mm/usercopy.c b/mm/usercopy.c
> index d155e12563b1..4d23a0e0e232 100644
> --- a/mm/usercopy.c
> +++ b/mm/usercopy.c
> @@ -206,17 +206,6 @@ static inline const char *check_heap_object(const void *ptr, unsigned long n,
>  {
>  	struct page *page;
>  
> -	/*
> -	 * Some architectures (arm64) return true for virt_addr_valid() on
> -	 * vmalloced addresses. Work around this by checking for vmalloc
> -	 * first.
> -	 *
> -	 * We also need to check for module addresses explicitly since we
> -	 * may copy static data from modules to userspace
> -	 */
> -	if (is_vmalloc_or_module_addr(ptr))
> -		return NULL;
> -
>  	if (!virt_addr_valid(ptr))
>  		return NULL;
>  
> -- 
> 2.12.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ