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: <alpine.DEB.2.20.1707041555570.9000@nanos>
Date:   Tue, 4 Jul 2017 16:00:16 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Baoquan He <bhe@...hat.com>
cc:     linux-kernel@...r.kernel.org, x86@...nel.org, hpa@...or.com,
        mingo@...nel.org, keescook@...omium.org, thgarnie@...gle.com,
        caoj.fnst@...fujitsu.com, izumi.taku@...fujitsu.com
Subject: Re: [PATCH v2 2/2] x86/boot/KASLR: Restrict kernel to be randomized
 in mirror regions

On Tue, 4 Jul 2017, Baoquan He wrote:
> +/* Marks if efi mirror regions have been found and handled. */
> +static bool efi_mirror_found;
> +
> +static void process_efi_entry(unsigned long minimum, unsigned long image_size)
> +{
> +	struct efi_info *e = &boot_params->efi_info;
> +	struct mem_vector region;
> +	efi_memory_desc_t *md;
> +	unsigned long pmap;
> +	char *signature;
> +	u32 nr_desc;
> +	int i;
> +
> +
> +#ifdef CONFIG_EFI
> +	signature = (char *)&boot_params->efi_info.efi_loader_signature;
> +#endif

So if CONFIG_EFI=n you happily dereference the uninitialized signature
pointer ...

Why is process_efi_entry() invoked at all if EFI is not enabled?

> +	if (strncmp(signature, EFI32_LOADER_SIGNATURE, 4) &&
> +	    strncmp(signature, EFI64_LOADER_SIGNATURE, 4))
> +		return;
> +

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ