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: <20251120131654-78e73c37-988f-4f58-aefc-ea6dacc11603@linutronix.de>
Date: Thu, 20 Nov 2025 13:19:33 +0100
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: Thomas Gleixner <tglx@...utronix.de>, Nam Cao <namcao@...utronix.de>, 
	linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] MIPS: kernel: Fix random segmentation faults

On Thu, Nov 20, 2025 at 01:10:29PM +0100, Thomas Bogendoerfer wrote:
> Commit 69896119dc9d ("MIPS: vdso: Switch to generic storage
> implementation") switches to a generic vdso storage, which increases
> the number of data pages from 1 to 4. But there is only one page
> reserved, which causes segementation faults depending where the VDSO
> area is randomized to. To fix this use the same size of reservation
> and allocation of the VDSO data pages.
> 
> Fixes: 69896119dc9d ("MIPS: vdso: Switch to generic storage implementation")

Thanks!

Reviewed-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>

> Signed-off-by: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
> ---
> v2: Don't reserve additionnal VDSO_NR_PAGES, but reserve VDSO_NR_PAGES
>     instead of the one page before.
>     Reworked description
> v1: https://lore.kernel.org/all/20251117191815.69556-1-tsbogend@alpha.franken.de/
> 
>  arch/mips/kernel/process.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
> index 29191fa1801e..a3101f2268c6 100644
> --- a/arch/mips/kernel/process.c
> +++ b/arch/mips/kernel/process.c
> @@ -692,7 +692,7 @@ unsigned long mips_stack_top(void)
>  	/* Space for the VDSO, data page & GIC user page */
>  	if (current->thread.abi) {
>  		top -= PAGE_ALIGN(current->thread.abi->vdso->size);
> -		top -= PAGE_SIZE;
> +		top -= VDSO_NR_PAGES * PAGE_SIZE;
>  		top -= mips_gic_present() ? PAGE_SIZE : 0;
>  
>  		/* Space to randomize the VDSO base */
> -- 
> 2.43.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ