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]
Date:   Thu, 8 Apr 2021 16:34:20 +0000
From:   Liam Howlett <liam.howlett@...cle.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>,
        "linux-m68k@...ts.linux-m68k.org" <linux-m68k@...ts.linux-m68k.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>
CC:     Laurent Dufour <ldufour@...ux.ibm.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Daniel Jordan <daniel.m.jordan@...cle.com>,
        Michel Lespinasse <walken@...gle.com>
Subject: Re: [PATCH] arch/m68k/kernel/sys_m68k: Add missing mmap_read_lock()
 to sys_cacheflush()

Forgot the fixes line.

* Liam Howlett <liam.howlett@...cle.com> [210407 16:00]:
> When the superuser flushes the entire cache, the mmap_read_lock() is not
> taken, but mmap_read_unlock() is called.  Add the missing
> mmap_read_lock() call.
> 
> Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>
> ---
>  arch/m68k/kernel/sys_m68k.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c
> index 1c235d8f53f3..f55bdcb8e4f1 100644
> --- a/arch/m68k/kernel/sys_m68k.c
> +++ b/arch/m68k/kernel/sys_m68k.c
> @@ -388,6 +388,8 @@ sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len)
>  		ret = -EPERM;
>  		if (!capable(CAP_SYS_ADMIN))
>  			goto out;
> +
> +		mmap_read_lock(current->mm);
>  	} else {
>  		struct vm_area_struct *vma;
>  
> -- 
> 2.30.0

View attachment "0001-arch-m68k-kernel-sys_m68k-Add-missing-mmap_read_lock.patch" of type "text/x-diff" (1086 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ