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: <b4706369-f97c-8b78-f194-b45a870114e1@I-love.SAKURA.ne.jp>
Date:   Sat, 15 Apr 2023 18:52:41 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:     Lorenzo Stoakes <lstoakes@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/7] mm/gup: remove vmas parameter from
 get_user_pages_remote()

On 2023/04/15 18:08, Lorenzo Stoakes wrote:
> @@ -475,10 +474,14 @@ int uprobe_write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm,
>  		gup_flags |= FOLL_SPLIT_PMD;
>  	/* Read the page with vaddr into memory */
>  	ret = get_user_pages_remote(mm, vaddr, 1, gup_flags,
> -				    &old_page, &vma, NULL);
> +				    &old_page, NULL);
>  	if (ret <= 0)
>  		return ret;
>  
> +	vma = vma_lookup(mm, vaddr);
> +	if (!vma)
> +		goto put_old;
> +
>  	ret = verify_opcode(old_page, vaddr, &opcode);
>  	if (ret <= 0)
>  		goto put_old;

This conversion looks wrong.
This causes returning a positive number when vma_lookup() returned NULL.

  * Return 0 (success) or a negative errno.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ