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:   Mon, 17 Oct 2016 16:47:55 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Matt Redfearn <matt.redfearn@...tec.com>,
        Ralf Baechle <ralf@...ux-mips.org>
Cc:     linux-mips@...ux-mips.org, "# 4 . 7+" <stable@...r.kernel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] MIPS: KASLR: Fix handling of NULL FDT

Hello.

On 10/17/2016 01:04 PM, Matt Redfearn wrote:

> If platform code returns a NULL pointer to the FDT, initial_boot_params
> will not get set to a valid pointer and attempting to find the /chosen
> node in it will cause a NULL pointer dereference and the kernel to crash
> immediately on startup - with no output to the console.
>
> Fix this by checking that initial_boot_params is valid before using it.
>
> Fixes: 405bc8fd12f5 ("MIPS: Kernel: Implement KASLR using CONFIG_RELOCATABLE")
> Cc: <stable@...r.kernel.org> # 4.7+
> Signed-off-by: Matt Redfearn <matt.redfearn@...tec.com>
> ---
>
>  arch/mips/kernel/relocate.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/mips/kernel/relocate.c b/arch/mips/kernel/relocate.c
> index ca1cc30c0891..8810183840ca 100644
> --- a/arch/mips/kernel/relocate.c
> +++ b/arch/mips/kernel/relocate.c
> @@ -200,6 +200,7 @@ static inline __init unsigned long get_random_boot(void)
>
>  #if defined(CONFIG_USE_OF)
>  	/* Get any additional entropy passed in device tree */
> +	if (initial_boot_params)
>  	{

    CodingStyle: *if* and { should be on the same line.

[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ