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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170116104746.ouvbywtnfxwo5y2l@pd.tnic>
Date:   Mon, 16 Jan 2017 11:47:46 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Arvind Yadav <arvind.yadav.cs@...il.com>
Cc:     ravi@...ztechnologies.com, arvino55@...il.com, mchehab@...nel.org,
        linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] edac: i82975x_edac :- Handle return NULL error from
 ioremap_nocache

On Mon, Jan 16, 2017 at 12:14:52PM +0530, Arvind Yadav wrote:
> Here, If ioremap_nocache will fail. It will return NULL.
> Kernel can run into a NULL-pointer dereference.
> This error check will avoid NULL pointer dereference.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
> ---
>  drivers/edac/i82975x_edac.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c
> index 7baa8ac..e747d82 100644
> --- a/drivers/edac/i82975x_edac.c
> +++ b/drivers/edac/i82975x_edac.c
> @@ -494,6 +494,10 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx)
>  	}
>  	mchbar &= 0xffffc000;	/* bits 31:14 used for 16K window */
>  	mch_window = ioremap_nocache(mchbar, 0x1000);
> +	if (!mch_window) {
> +		edac_dbg(3, "failed to memory map!\n");
> +		goto fail0;
> +	}
>  
>  #ifdef i82975x_DEBUG_IOMEM
>  	i82975x_printk(KERN_INFO, "MCHBAR real = %0x, remapped = %p\n",
> -- 

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ