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, 30 Jan 2017 20:37:57 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Shailendra Verma <shailendra.v@...sung.com>
Cc:     Cory Tusar <cory.tusar@...1solutions.com>,
        Vladimir Zapolskiy <vz@...ia.com>,
        Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Andrew Lunn <andrew@...n.ch>, linux-kernel@...r.kernel.org,
        p.shailesh@...sung.com, ashish.kalra@...sung.com,
        Shailendra Verma <shailendra.capricorn@...il.com>
Subject: Re: [PATCH] Misc: eeprom - Fix possible NULL derefrence.

On Fri, Jan 27, 2017 at 04:42:31PM +0530, Shailendra Verma wrote:
> of_match_device could return NULL, and so can cause a NULL
> pointer dereference later.
> 
> Signed-off-by: Shailendra Verma <shailendra.v@...sung.com>
> ---
>  drivers/misc/eeprom/eeprom_93xx46.c |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/misc/eeprom/eeprom_93xx46.c b/drivers/misc/eeprom/eeprom_93xx46.c
> index 94cc035..6555975 100644
> --- a/drivers/misc/eeprom/eeprom_93xx46.c
> +++ b/drivers/misc/eeprom/eeprom_93xx46.c
> @@ -381,6 +381,11 @@ static int eeprom_93xx46_probe_dt(struct spi_device *spi)
>  	enum of_gpio_flags of_flags;
>  	int ret;
>  
> +	if (!of_id) {
> +		dev_err(&spi->dev, "Error: No device match found\n");
> +		return -ENODEV;
> +	}
> +

Also dropped due to this not being possible.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ