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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250115200138.708adc518dd4f92f4fe7fae5@linux-foundation.org>
Date: Wed, 15 Jan 2025 20:01:38 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Liu Ye <liuye@...inos.cn>
Cc: Liam.Howlett@...cle.com, lorenzo.stoakes@...cle.com, jannh@...gle.com,
 vbabka@...e.cz, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/vma: Add VM_WARN_ON for commit_merge

On Thu, 16 Jan 2025 10:50:05 +0800 Liu Ye <liuye@...inos.cn> wrote:

>     Add VM_WARN_ON to prevent 'adjust' from accessing NULL pointers
>     when 'adjust' is NULL and 'expanded' is false or 'adj_start' is
>     not zero.
>
> ...
>
> --- a/mm/vma.c
> +++ b/mm/vma.c
> @@ -641,6 +641,7 @@ static int commit_merge(struct vma_merge_struct *vmg,
>  
>  	init_multi_vma_prep(&vp, vmg->vma, adjust, remove, remove2);
>  
> +	VM_WARN_ON(!adjust && (!expanded || adj_start));
>  	VM_WARN_ON(vp.anon_vma && adjust && adjust->anon_vma &&
>  		   vp.anon_vma != adjust->anon_vma);
>  

This won't prevent a null deref.  It will emit a warning which
duplicates all the information which we're about to emit from the oops
handler.

Are there any reports of an oops from a NULL deref of `adjust'?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ